boot-nemonic-printer 0.1.0

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 (84) hide show
  1. package/.eslintrc.js +5 -0
  2. package/README.md +209 -0
  3. package/ai/example-ui-card-refactor.md +348 -0
  4. package/android/build.gradle +22 -0
  5. package/android/libs/NemonicSdk.aar +0 -0
  6. package/android/src/main/AndroidManifest.xml +2 -0
  7. package/android/src/main/java/net/eventboot/nemonicprinter/BootNemonicPrinterModule.kt +509 -0
  8. package/build/BootNemonicPrinter.types.d.ts +44 -0
  9. package/build/BootNemonicPrinter.types.d.ts.map +1 -0
  10. package/build/BootNemonicPrinter.types.js +2 -0
  11. package/build/BootNemonicPrinter.types.js.map +1 -0
  12. package/build/BootNemonicPrinterModule.d.ts +36 -0
  13. package/build/BootNemonicPrinterModule.d.ts.map +1 -0
  14. package/build/BootNemonicPrinterModule.js +3 -0
  15. package/build/BootNemonicPrinterModule.js.map +1 -0
  16. package/build/constants/NBatteryStatus.d.ts +8 -0
  17. package/build/constants/NBatteryStatus.d.ts.map +1 -0
  18. package/build/constants/NBatteryStatus.js +7 -0
  19. package/build/constants/NBatteryStatus.js.map +1 -0
  20. package/build/constants/NCartridgeType.d.ts +35 -0
  21. package/build/constants/NCartridgeType.d.ts.map +1 -0
  22. package/build/constants/NCartridgeType.js +183 -0
  23. package/build/constants/NCartridgeType.js.map +1 -0
  24. package/build/constants/NConnectState.d.ts +8 -0
  25. package/build/constants/NConnectState.d.ts.map +1 -0
  26. package/build/constants/NConnectState.js +7 -0
  27. package/build/constants/NConnectState.js.map +1 -0
  28. package/build/constants/NPowerSaveMode.d.ts +6 -0
  29. package/build/constants/NPowerSaveMode.d.ts.map +1 -0
  30. package/build/constants/NPowerSaveMode.js +5 -0
  31. package/build/constants/NPowerSaveMode.js.map +1 -0
  32. package/build/constants/NPrintImageLength.d.ts +12 -0
  33. package/build/constants/NPrintImageLength.d.ts.map +1 -0
  34. package/build/constants/NPrintImageLength.js +12 -0
  35. package/build/constants/NPrintImageLength.js.map +1 -0
  36. package/build/constants/NPrintQuality.d.ts +7 -0
  37. package/build/constants/NPrintQuality.d.ts.map +1 -0
  38. package/build/constants/NPrintQuality.js +6 -0
  39. package/build/constants/NPrintQuality.js.map +1 -0
  40. package/build/constants/NPrinterStatus.d.ts +9 -0
  41. package/build/constants/NPrinterStatus.d.ts.map +1 -0
  42. package/build/constants/NPrinterStatus.js +8 -0
  43. package/build/constants/NPrinterStatus.js.map +1 -0
  44. package/build/constants/NPrinterType.d.ts +9 -0
  45. package/build/constants/NPrinterType.d.ts.map +1 -0
  46. package/build/constants/NPrinterType.js +8 -0
  47. package/build/constants/NPrinterType.js.map +1 -0
  48. package/build/constants/NResult.d.ts +51 -0
  49. package/build/constants/NResult.d.ts.map +1 -0
  50. package/build/constants/NResult.js +50 -0
  51. package/build/constants/NResult.js.map +1 -0
  52. package/build/index.d.ts +13 -0
  53. package/build/index.d.ts.map +1 -0
  54. package/build/index.js +13 -0
  55. package/build/index.js.map +1 -0
  56. package/expo-module.config.json +9 -0
  57. package/ios/BootNemonicPrinter.podspec +31 -0
  58. package/ios/BootNemonicPrinterModule.swift +257 -0
  59. package/ios/Frameworks/NemonicSdk.framework/Headers/NemonicSdk-Swift.h +797 -0
  60. package/ios/Frameworks/NemonicSdk.framework/Headers/NemonicSdk.h +18 -0
  61. package/ios/Frameworks/NemonicSdk.framework/Info.plist +0 -0
  62. package/ios/Frameworks/NemonicSdk.framework/Modules/NemonicSdk.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  63. package/ios/Frameworks/NemonicSdk.framework/Modules/NemonicSdk.swiftmodule/arm64-apple-ios.abi.json +12244 -0
  64. package/ios/Frameworks/NemonicSdk.framework/Modules/NemonicSdk.swiftmodule/arm64-apple-ios.private.swiftinterface +356 -0
  65. package/ios/Frameworks/NemonicSdk.framework/Modules/NemonicSdk.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  66. package/ios/Frameworks/NemonicSdk.framework/Modules/NemonicSdk.swiftmodule/arm64-apple-ios.swiftinterface +356 -0
  67. package/ios/Frameworks/NemonicSdk.framework/Modules/NemonicSdk.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  68. package/ios/Frameworks/NemonicSdk.framework/Modules/module.modulemap +11 -0
  69. package/ios/Frameworks/NemonicSdk.framework/NemonicSdk +0 -0
  70. package/ios/Frameworks/NemonicSdk.framework/_CodeSignature/CodeResources +237 -0
  71. package/package.json +44 -0
  72. package/src/BootNemonicPrinter.types.ts +50 -0
  73. package/src/BootNemonicPrinterModule.ts +48 -0
  74. package/src/constants/NBatteryStatus.ts +8 -0
  75. package/src/constants/NCartridgeType.ts +181 -0
  76. package/src/constants/NConnectState.ts +8 -0
  77. package/src/constants/NPowerSaveMode.ts +6 -0
  78. package/src/constants/NPrintImageLength.ts +11 -0
  79. package/src/constants/NPrintQuality.ts +7 -0
  80. package/src/constants/NPrinterStatus.ts +9 -0
  81. package/src/constants/NPrinterType.ts +9 -0
  82. package/src/constants/NResult.ts +51 -0
  83. package/src/index.ts +13 -0
  84. package/tsconfig.json +9 -0
@@ -0,0 +1,797 @@
1
+ #if 0
2
+ #elif defined(__arm64__) && __arm64__
3
+ // Generated by Apple Swift version 6.2.1 effective-5.10 (swiftlang-6.2.1.4.8 clang-1700.4.4.1)
4
+ #ifndef NEMONICSDK_SWIFT_H
5
+ #define NEMONICSDK_SWIFT_H
6
+ #pragma clang diagnostic push
7
+ #pragma clang diagnostic ignored "-Wgcc-compat"
8
+
9
+ #if !defined(__has_include)
10
+ # define __has_include(x) 0
11
+ #endif
12
+ #if !defined(__has_attribute)
13
+ # define __has_attribute(x) 0
14
+ #endif
15
+ #if !defined(__has_feature)
16
+ # define __has_feature(x) 0
17
+ #endif
18
+ #if !defined(__has_warning)
19
+ # define __has_warning(x) 0
20
+ #endif
21
+
22
+ #if __has_include(<swift/objc-prologue.h>)
23
+ # include <swift/objc-prologue.h>
24
+ #endif
25
+
26
+ #pragma clang diagnostic ignored "-Wauto-import"
27
+ #if defined(__OBJC__)
28
+ #include <Foundation/Foundation.h>
29
+ #endif
30
+ #if defined(__cplusplus)
31
+ #include <cstdint>
32
+ #include <cstddef>
33
+ #include <cstdbool>
34
+ #include <cstring>
35
+ #include <stdlib.h>
36
+ #include <new>
37
+ #include <type_traits>
38
+ #else
39
+ #include <stdint.h>
40
+ #include <stddef.h>
41
+ #include <stdbool.h>
42
+ #include <string.h>
43
+ #endif
44
+ #if defined(__cplusplus)
45
+ #pragma clang diagnostic push
46
+ #pragma clang diagnostic ignored "-Wnon-modular-include-in-framework-module"
47
+ #if defined(__arm64e__) && __has_include(<ptrauth.h>)
48
+ # include <ptrauth.h>
49
+ #else
50
+ #pragma clang diagnostic push
51
+ #pragma clang diagnostic ignored "-Wreserved-macro-identifier"
52
+ # ifndef __ptrauth_swift_value_witness_function_pointer
53
+ # define __ptrauth_swift_value_witness_function_pointer(x)
54
+ # endif
55
+ # ifndef __ptrauth_swift_class_method_pointer
56
+ # define __ptrauth_swift_class_method_pointer(x)
57
+ # endif
58
+ #pragma clang diagnostic pop
59
+ #endif
60
+ #pragma clang diagnostic pop
61
+ #endif
62
+
63
+ #if !defined(SWIFT_TYPEDEFS)
64
+ # define SWIFT_TYPEDEFS 1
65
+ # if __has_include(<uchar.h>)
66
+ # include <uchar.h>
67
+ # elif !defined(__cplusplus)
68
+ typedef unsigned char char8_t;
69
+ typedef uint_least16_t char16_t;
70
+ typedef uint_least32_t char32_t;
71
+ # endif
72
+ typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
73
+ typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
74
+ typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
75
+ typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
76
+ typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
77
+ typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
78
+ typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
79
+ typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
80
+ typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
81
+ typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
82
+ typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
83
+ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
84
+ #endif
85
+
86
+ #if !defined(SWIFT_PASTE)
87
+ # define SWIFT_PASTE_HELPER(x, y) x##y
88
+ # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
89
+ #endif
90
+ #if !defined(SWIFT_METATYPE)
91
+ # define SWIFT_METATYPE(X) Class
92
+ #endif
93
+ #if !defined(SWIFT_CLASS_PROPERTY)
94
+ # if __has_feature(objc_class_property)
95
+ # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
96
+ # else
97
+ # define SWIFT_CLASS_PROPERTY(...)
98
+ # endif
99
+ #endif
100
+ #if !defined(SWIFT_RUNTIME_NAME)
101
+ # if __has_attribute(objc_runtime_name)
102
+ # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
103
+ # else
104
+ # define SWIFT_RUNTIME_NAME(X)
105
+ # endif
106
+ #endif
107
+ #if !defined(SWIFT_COMPILE_NAME)
108
+ # if __has_attribute(swift_name)
109
+ # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
110
+ # else
111
+ # define SWIFT_COMPILE_NAME(X)
112
+ # endif
113
+ #endif
114
+ #if !defined(SWIFT_METHOD_FAMILY)
115
+ # if __has_attribute(objc_method_family)
116
+ # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
117
+ # else
118
+ # define SWIFT_METHOD_FAMILY(X)
119
+ # endif
120
+ #endif
121
+ #if !defined(SWIFT_NOESCAPE)
122
+ # if __has_attribute(noescape)
123
+ # define SWIFT_NOESCAPE __attribute__((noescape))
124
+ # else
125
+ # define SWIFT_NOESCAPE
126
+ # endif
127
+ #endif
128
+ #if !defined(SWIFT_RELEASES_ARGUMENT)
129
+ # if __has_attribute(ns_consumed)
130
+ # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
131
+ # else
132
+ # define SWIFT_RELEASES_ARGUMENT
133
+ # endif
134
+ #endif
135
+ #if !defined(SWIFT_WARN_UNUSED_RESULT)
136
+ # if __has_attribute(warn_unused_result)
137
+ # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
138
+ # else
139
+ # define SWIFT_WARN_UNUSED_RESULT
140
+ # endif
141
+ #endif
142
+ #if !defined(SWIFT_NORETURN)
143
+ # if __has_attribute(noreturn)
144
+ # define SWIFT_NORETURN __attribute__((noreturn))
145
+ # else
146
+ # define SWIFT_NORETURN
147
+ # endif
148
+ #endif
149
+ #if !defined(SWIFT_CLASS_EXTRA)
150
+ # define SWIFT_CLASS_EXTRA
151
+ #endif
152
+ #if !defined(SWIFT_PROTOCOL_EXTRA)
153
+ # define SWIFT_PROTOCOL_EXTRA
154
+ #endif
155
+ #if !defined(SWIFT_ENUM_EXTRA)
156
+ # define SWIFT_ENUM_EXTRA
157
+ #endif
158
+ #if !defined(SWIFT_CLASS)
159
+ # if __has_attribute(objc_subclassing_restricted)
160
+ # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
161
+ # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
162
+ # else
163
+ # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
164
+ # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
165
+ # endif
166
+ #endif
167
+ #if !defined(SWIFT_RESILIENT_CLASS)
168
+ # if __has_attribute(objc_class_stub)
169
+ # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
170
+ # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
171
+ # else
172
+ # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
173
+ # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
174
+ # endif
175
+ #endif
176
+ #if !defined(SWIFT_PROTOCOL)
177
+ # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
178
+ # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
179
+ #endif
180
+ #if !defined(SWIFT_EXTENSION)
181
+ # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
182
+ #endif
183
+ #if !defined(OBJC_DESIGNATED_INITIALIZER)
184
+ # if __has_attribute(objc_designated_initializer)
185
+ # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
186
+ # else
187
+ # define OBJC_DESIGNATED_INITIALIZER
188
+ # endif
189
+ #endif
190
+ #if !defined(SWIFT_ENUM_ATTR)
191
+ # if __has_attribute(enum_extensibility)
192
+ # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
193
+ # else
194
+ # define SWIFT_ENUM_ATTR(_extensibility)
195
+ # endif
196
+ #endif
197
+ #if !defined(SWIFT_ENUM)
198
+ # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
199
+ # if __has_feature(generalized_swift_name)
200
+ # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
201
+ # else
202
+ # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
203
+ # endif
204
+ #endif
205
+ #if !defined(SWIFT_UNAVAILABLE)
206
+ # define SWIFT_UNAVAILABLE __attribute__((unavailable))
207
+ #endif
208
+ #if !defined(SWIFT_UNAVAILABLE_MSG)
209
+ # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
210
+ #endif
211
+ #if !defined(SWIFT_AVAILABILITY)
212
+ # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
213
+ #endif
214
+ #if !defined(SWIFT_WEAK_IMPORT)
215
+ # define SWIFT_WEAK_IMPORT __attribute__((weak_import))
216
+ #endif
217
+ #if !defined(SWIFT_DEPRECATED)
218
+ # define SWIFT_DEPRECATED __attribute__((deprecated))
219
+ #endif
220
+ #if !defined(SWIFT_DEPRECATED_MSG)
221
+ # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
222
+ #endif
223
+ #if !defined(SWIFT_DEPRECATED_OBJC)
224
+ # if __has_feature(attribute_diagnose_if_objc)
225
+ # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
226
+ # else
227
+ # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
228
+ # endif
229
+ #endif
230
+ #if defined(__OBJC__)
231
+ #if !defined(IBSegueAction)
232
+ # define IBSegueAction
233
+ #endif
234
+ #endif
235
+ #if !defined(SWIFT_EXTERN)
236
+ # if defined(__cplusplus)
237
+ # define SWIFT_EXTERN extern "C"
238
+ # else
239
+ # define SWIFT_EXTERN extern
240
+ # endif
241
+ #endif
242
+ #if !defined(SWIFT_CALL)
243
+ # define SWIFT_CALL __attribute__((swiftcall))
244
+ #endif
245
+ #if !defined(SWIFT_INDIRECT_RESULT)
246
+ # define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
247
+ #endif
248
+ #if !defined(SWIFT_CONTEXT)
249
+ # define SWIFT_CONTEXT __attribute__((swift_context))
250
+ #endif
251
+ #if !defined(SWIFT_ERROR_RESULT)
252
+ # define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
253
+ #endif
254
+ #if defined(__cplusplus)
255
+ # define SWIFT_NOEXCEPT noexcept
256
+ #else
257
+ # define SWIFT_NOEXCEPT
258
+ #endif
259
+ #if !defined(SWIFT_C_INLINE_THUNK)
260
+ # if __has_attribute(always_inline)
261
+ # if __has_attribute(nodebug)
262
+ # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
263
+ # else
264
+ # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
265
+ # endif
266
+ # else
267
+ # define SWIFT_C_INLINE_THUNK inline
268
+ # endif
269
+ #endif
270
+ #if defined(_WIN32)
271
+ #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
272
+ # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
273
+ #endif
274
+ #else
275
+ #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
276
+ # define SWIFT_IMPORT_STDLIB_SYMBOL
277
+ #endif
278
+ #endif
279
+ #if defined(__OBJC__)
280
+ #if __has_feature(objc_modules)
281
+ #if __has_warning("-Watimport-in-framework-header")
282
+ #pragma clang diagnostic ignored "-Watimport-in-framework-header"
283
+ #endif
284
+ @import ObjectiveC;
285
+ #endif
286
+
287
+ #endif
288
+ #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
289
+ #pragma clang diagnostic ignored "-Wduplicate-method-arg"
290
+ #if __has_warning("-Wpragma-clang-attribute")
291
+ # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
292
+ #endif
293
+ #pragma clang diagnostic ignored "-Wunknown-pragmas"
294
+ #pragma clang diagnostic ignored "-Wnullability"
295
+ #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
296
+ #pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
297
+
298
+ #if __has_attribute(external_source_symbol)
299
+ # pragma push_macro("any")
300
+ # undef any
301
+ # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="NemonicSdk",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
302
+ # pragma pop_macro("any")
303
+ #endif
304
+
305
+ #if defined(__OBJC__)
306
+
307
+ typedef SWIFT_ENUM_NAMED(NSInteger, NBatteryStatus, "NBatteryStatus", open) {
308
+ /// Normal battery level without charging.
309
+ NBatteryStatusNoCharging = 0,
310
+ /// Low battery level for printing without charging.
311
+ NBatteryStatusLowNoCharging = 1,
312
+ /// Normal battery level with charging.
313
+ NBatteryStatusCharging = 2,
314
+ /// Low battery level for printing with charging.
315
+ NBatteryStatusLowCharging = 3,
316
+ };
317
+
318
+ typedef SWIFT_ENUM_NAMED(NSInteger, NCartridgeType, "NCartridgeType", open) {
319
+ /// None.
320
+ NCartridgeTypeNone = -1,
321
+ /// White sticky cartridge.
322
+ NCartridgeTypeWhite = 0,
323
+ /// Yellow sticky cartridge.
324
+ NCartridgeTypeYellow = 1,
325
+ /// Green sticky cartridge.
326
+ NCartridgeTypeGreen = 2,
327
+ /// Blue sticky cartridge.
328
+ NCartridgeTypeBlue = 3,
329
+ /// Pink sticky cartridge.
330
+ NCartridgeTypePink = 7,
331
+ /// 3x1 label cartridge.
332
+ NCartridgeTypeL1 = 13,
333
+ /// 3x2 label cartridge.
334
+ NCartridgeTypeL2 = 12,
335
+ /// 3x3 label cartridge.
336
+ NCartridgeTypeL3 = 10,
337
+ /// 3x4 label cartridge.
338
+ NCartridgeTypeL4 = 6,
339
+ /// 3x5 label cartridge.
340
+ NCartridgeTypeL5 = 8,
341
+ /// 3x6 label cartridge.
342
+ NCartridgeTypeL6 = 5,
343
+ /// 3x7 label cartridge.
344
+ NCartridgeTypeL7 = 9,
345
+ /// 3x8 label cartridge.
346
+ NCartridgeTypeL8 = 11,
347
+ /// 3x1 mini cartridge.
348
+ NCartridgeTypeM1 = 101,
349
+ /// 3x2 mini cartridge.
350
+ NCartridgeTypeM2 = 102,
351
+ /// 3x3 mini cartridge.
352
+ NCartridgeTypeM3 = 103,
353
+ /// 3x4 mini cartridge.
354
+ NCartridgeTypeM4 = 104,
355
+ /// 3x5 mini cartridge.
356
+ NCartridgeTypeM5 = 105,
357
+ /// 3x6 mini cartridge.
358
+ NCartridgeTypeM6 = 106,
359
+ /// 3x7 mini cartridge.
360
+ NCartridgeTypeM7 = 107,
361
+ /// 3x8 mini cartridge.
362
+ NCartridgeTypeM8 = 108,
363
+ /// ? cartridge.
364
+ NCartridgeTypeQuestion = 4,
365
+ /// N cartridge.
366
+ NCartridgeTypeN = 14,
367
+ };
368
+
369
+ typedef SWIFT_ENUM_NAMED(NSInteger, NConnectState, "NConnectState", open) {
370
+ /// Disconnected state.
371
+ NConnectStateDisconnected = 0x00,
372
+ /// Connecting state.
373
+ NConnectStateConnecting = 0x01,
374
+ /// Connected state.
375
+ NConnectStateConnected = 0x02,
376
+ /// Disconnecting state.
377
+ NConnectStateDisconnecting = 0x03,
378
+ };
379
+
380
+ SWIFT_CLASS_NAMED("NPrintImageLength")
381
+ @interface NPrintImageLength : NSObject
382
+ /// Horizontal Pixels for printing.
383
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger printWidth;)
384
+ + (NSInteger)printWidth SWIFT_WARN_UNUSED_RESULT;
385
+ /// Maximum Pixels that can be printed at one time.
386
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger maxLength;)
387
+ + (NSInteger)maxLength SWIFT_WARN_UNUSED_RESULT;
388
+ /// Maximum Pixels that can be printed at one time for MIP-201(Nemonic AI).
389
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger maxLengthMip201;)
390
+ + (NSInteger)maxLengthMip201 SWIFT_WARN_UNUSED_RESULT;
391
+ /// Maximum Pixels that can be set for printer templates at one time.
392
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger maxTemplateLength;)
393
+ + (NSInteger)maxTemplateLength SWIFT_WARN_UNUSED_RESULT;
394
+ /// Maximum Pixels that can be set for printer templates at one time for MIP-201(Nemonic AI).
395
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger maxTemplateLengthMip201;)
396
+ + (NSInteger)maxTemplateLengthMip201 SWIFT_WARN_UNUSED_RESULT;
397
+ /// Vertical Pixels on 3x1 Paper.
398
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger content1inch;)
399
+ + (NSInteger)content1inch SWIFT_WARN_UNUSED_RESULT;
400
+ /// Vertical Pixels on 3x2 Paper.
401
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger content2inch;)
402
+ + (NSInteger)content2inch SWIFT_WARN_UNUSED_RESULT;
403
+ /// Vertical Pixels on 3x3 Paper.
404
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger content3inch;)
405
+ + (NSInteger)content3inch SWIFT_WARN_UNUSED_RESULT;
406
+ /// Vertical Pixels on 3x4 Paper.
407
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger content4inch;)
408
+ + (NSInteger)content4inch SWIFT_WARN_UNUSED_RESULT;
409
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
410
+ @end
411
+
412
+ @class NSString;
413
+ /// Information for printing.
414
+ SWIFT_CLASS("_TtC10NemonicSdk10NPrintInfo")
415
+ @interface NPrintInfo : NSObject
416
+ /// Get summary information for printing.
417
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
418
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
419
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
420
+ @end
421
+
422
+ typedef SWIFT_ENUM_NAMED(NSInteger, NPrintQuality, "NPrintQuality", open) {
423
+ /// Low quality and fast speed(Max speed: 80mm/s).
424
+ NPrintQualityLowFast = 0,
425
+ /// Middle quality and middle speed(Max speed: 40mm/s).
426
+ NPrintQualityMiddle = 1,
427
+ /// High quality and slow speed(Max speed: 25/s).
428
+ NPrintQualityHighSlow = 2,
429
+ };
430
+
431
+ enum NPrinterType : NSInteger;
432
+ SWIFT_CLASS_NAMED("NPrinter")
433
+ @interface NPrinter : NSObject
434
+ /// Basic constructor.
435
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
436
+ /// Constructor with name and macAddress.
437
+ /// \param name Printer Bluetooth name.
438
+ ///
439
+ /// \param macAddress Printer Bluetooth Mac address.
440
+ ///
441
+ - (nonnull instancetype)initWithName:(NSString * _Nonnull)name macAddress:(NSString * _Nonnull)macAddress OBJC_DESIGNATED_INITIALIZER;
442
+ /// Constructor with type, name and macAddress.
443
+ /// \param type Printer type.
444
+ ///
445
+ /// \param name Printer Bluetooth name.
446
+ ///
447
+ /// \param macAddress Printer Bluetooth Mac Address.
448
+ ///
449
+ - (nonnull instancetype)initWithType:(enum NPrinterType)type name:(NSString * _Nonnull)name macAddress:(NSString * _Nonnull)macAddress OBJC_DESIGNATED_INITIALIZER;
450
+ /// Whether the printer information is empty.
451
+ ///
452
+ /// returns:
453
+ /// Whether the printer information is empty.
454
+ - (BOOL)isEmpty SWIFT_WARN_UNUSED_RESULT;
455
+ /// Whether the printer information is a Nemonic product.
456
+ ///
457
+ /// returns:
458
+ /// Whether the printer information is a Nemonic product.
459
+ - (BOOL)isValid SWIFT_WARN_UNUSED_RESULT;
460
+ /// Reset printer information.
461
+ - (void)reset;
462
+ /// Get printer Bluetooth name.
463
+ ///
464
+ /// returns:
465
+ /// Printer Bluetooth name.
466
+ - (NSString * _Nonnull)getName SWIFT_WARN_UNUSED_RESULT;
467
+ /// Set printer Bluetooth name.
468
+ /// \param name Printer Bluetooth name.
469
+ ///
470
+ - (void)setName:(NSString * _Nonnull)name;
471
+ /// Check printer Bluetooth name validation.
472
+ /// \param name Printer Bluetooth name.
473
+ ///
474
+ ///
475
+ /// returns:
476
+ /// Printer Bluetooth name valid.
477
+ - (BOOL)checkName:(NSString * _Nonnull)name SWIFT_WARN_UNUSED_RESULT;
478
+ /// Check printer Bluetooth name validation.
479
+ /// \param type Printer type.
480
+ ///
481
+ /// \param name Printer Bluetooth name.
482
+ ///
483
+ ///
484
+ /// returns:
485
+ /// Printer Bluetooth name valid.
486
+ + (BOOL)checkNameWithType:(enum NPrinterType)type name:(NSString * _Nonnull)name SWIFT_WARN_UNUSED_RESULT;
487
+ /// Check printer Bluetooth name without cartridge type(using setting printer name).
488
+ /// \param type Printer type.
489
+ ///
490
+ /// \param name Printer Bluetooth name.
491
+ ///
492
+ ///
493
+ /// returns:
494
+ /// Printer Bluetooth name valid.
495
+ + (BOOL)checkNameWithoutCartridgeTypeWithType:(enum NPrinterType)type name:(NSString * _Nonnull)name SWIFT_WARN_UNUSED_RESULT;
496
+ /// Get Mac address.
497
+ ///
498
+ /// returns:
499
+ /// Mac address.
500
+ - (NSString * _Nonnull)getMacAddress SWIFT_WARN_UNUSED_RESULT;
501
+ /// Set Mac address.
502
+ /// \param macAddress Mac address.
503
+ ///
504
+ - (BOOL)setMacAddress:(NSString * _Nonnull)macAddress SWIFT_WARN_UNUSED_RESULT;
505
+ /// Check Mac address valid.
506
+ /// \param macAddress Mac address.
507
+ ///
508
+ ///
509
+ /// returns:
510
+ /// Mac address valid.
511
+ - (BOOL)checkMacAddress:(NSString * _Nonnull)macAddress SWIFT_WARN_UNUSED_RESULT;
512
+ /// Get printer type.
513
+ ///
514
+ /// returns:
515
+ /// Printer type.
516
+ - (enum NPrinterType)getType SWIFT_WARN_UNUSED_RESULT;
517
+ /// Set printer type.
518
+ /// \param type Printer type.
519
+ ///
520
+ - (void)setType:(enum NPrinterType)type;
521
+ /// Whether the printer has a valid cartridge.
522
+ ///
523
+ /// returns:
524
+ /// Whether the printer has a valid cartridge.
525
+ - (BOOL)hasValidCartridge SWIFT_WARN_UNUSED_RESULT;
526
+ /// Whether the printer is Nemonic mini printer.
527
+ ///
528
+ /// returns:
529
+ /// Whether the printer is Nemonic mini printer.
530
+ - (BOOL)isMini SWIFT_WARN_UNUSED_RESULT;
531
+ /// Label printer or not(It does not refer to a Nemonic Label product(MIP-001L)).
532
+ ///
533
+ /// returns:
534
+ /// Label printer or not.(When the result is false, it does not mean that it is not a Nemonic Label product (MIP-001L)).
535
+ - (BOOL)isLabel SWIFT_WARN_UNUSED_RESULT;
536
+ /// Whether it is a sticky cartridge type.
537
+ ///
538
+ /// returns:
539
+ /// Whether it is a sticky cartridge type.
540
+ - (BOOL)isSticky SWIFT_WARN_UNUSED_RESULT;
541
+ /// Whether it is a fixed length cartridge type.
542
+ ///
543
+ /// returns:
544
+ /// Whether it is a fixed length cartridge type.
545
+ - (BOOL)isFixedPaperSize SWIFT_WARN_UNUSED_RESULT;
546
+ /// Whether the printer supports batteries.
547
+ ///
548
+ /// returns:
549
+ /// Whether the printer supports batteries.
550
+ - (BOOL)isSupportedBattery SWIFT_WARN_UNUSED_RESULT;
551
+ /// Whether the printer supports password.
552
+ ///
553
+ /// returns:
554
+ /// Whether the printer supports password.
555
+ - (BOOL)isSupportedPassword SWIFT_WARN_UNUSED_RESULT;
556
+ /// Get cartridge type (based on printer name).
557
+ ///
558
+ /// returns:
559
+ /// Cartridge type.
560
+ - (enum NCartridgeType)getCartridgeType SWIFT_WARN_UNUSED_RESULT;
561
+ /// Get print time.
562
+ /// \param height Print image height.
563
+ ///
564
+ /// \param copies Print copies.
565
+ ///
566
+ ///
567
+ /// returns:
568
+ /// Print time (msec).
569
+ - (NSInteger)getWaitTimeForPrint:(NSInteger)height :(NSInteger)copies SWIFT_WARN_UNUSED_RESULT;
570
+ /// Whether it is the same printer (based on Mac address).
571
+ /// \param object Other NPrinter object for comparison.
572
+ ///
573
+ ///
574
+ /// returns:
575
+ /// Whether it is the same printer.
576
+ - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
577
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
578
+ @end
579
+
580
+ @protocol NPrinterControllerDelegate;
581
+ SWIFT_CLASS_NAMED("NPrinterController")
582
+ @interface NPrinterController : NSObject
583
+ /// Basic constructor.
584
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
585
+ /// Constructor using delegate
586
+ /// \param delegate Delegate object.
587
+ ///
588
+ - (nonnull instancetype)init:(id <NPrinterControllerDelegate> _Nonnull)delegate OBJC_DESIGNATED_INITIALIZER;
589
+ /// Get default delay after connecting.(Only Nemonic AI printer)
590
+ ///
591
+ /// returns:
592
+ /// Default delay after connecting (milly second).
593
+ - (uint32_t)getDefaultConnectDelay SWIFT_WARN_UNUSED_RESULT;
594
+ /// Get delay after connecting.(Only Nemonic AI printer)
595
+ ///
596
+ /// returns:
597
+ /// Delay after connecting (milly second).
598
+ - (uint32_t)getConnectDelay SWIFT_WARN_UNUSED_RESULT;
599
+ /// Set delay after connecting.(Only Nemonic AI printer)
600
+ /// \param delay Delay after connecting (milly second).
601
+ ///
602
+ - (void)setConnectDelay:(uint32_t)delay;
603
+ /// Connect the printer selecting Bluetooth mode automatically depending on the printer type.
604
+ /// \param printer Printer to connect to.
605
+ ///
606
+ ///
607
+ /// returns:
608
+ /// Connect result (NResult).
609
+ - (NSInteger)connect:(NPrinter * _Nonnull)printer queueLabel:(NSString * _Nullable)queueLabel SWIFT_WARN_UNUSED_RESULT;
610
+ @end
611
+
612
+ SWIFT_PROTOCOL_NAMED("NPrinterControllerDelegate")
613
+ @protocol NPrinterControllerDelegate <NSObject>
614
+ /// Called when the printer is disconnected due to external factors.
615
+ - (void)disconnected;
616
+ /// Called to notify the progress of each print image when printing multiple images.
617
+ /// \param index Current print completion index (starting from 0).
618
+ ///
619
+ /// \param total Total number of printing images.
620
+ ///
621
+ /// \param result Print result of the currently printed index.
622
+ ///
623
+ - (void)printProgressWithIndex:(NSInteger)index total:(NSInteger)total result:(NSInteger)result;
624
+ /// Called when all printing is complete.
625
+ /// \param result Print result.
626
+ ///
627
+ - (void)printCompleteWithResult:(NSInteger)result;
628
+ @end
629
+
630
+ @protocol NPrinterScanControllerDelegate;
631
+ SWIFT_CLASS_NAMED("NPrinterScanController")
632
+ @interface NPrinterScanController : NSObject
633
+ @property (nonatomic, strong) id <NPrinterScanControllerDelegate> _Nullable delegate;
634
+ /// Basic constructor.
635
+ /// \param delegate Callback object.
636
+ ///
637
+ - (nonnull instancetype)init:(id <NPrinterScanControllerDelegate> _Nonnull)delegate OBJC_DESIGNATED_INITIALIZER;
638
+ /// Start scan.
639
+ ///
640
+ /// returns:
641
+ /// Start scan result (NResult).
642
+ - (NSInteger)startScan SWIFT_WARN_UNUSED_RESULT;
643
+ /// Stop scan.
644
+ - (void)stopScan;
645
+ /// Whether scanning.
646
+ ///
647
+ /// returns:
648
+ /// Whether scanning.
649
+ - (BOOL)isInScan SWIFT_WARN_UNUSED_RESULT;
650
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
651
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
652
+ @end
653
+
654
+ SWIFT_PROTOCOL_NAMED("NPrinterScanControllerDelegate")
655
+ @protocol NPrinterScanControllerDelegate <NSObject>
656
+ /// Called when a printer is found.
657
+ /// \param printer Printer information found.
658
+ ///
659
+ - (void)deviceFound:(NPrinter * _Nonnull)printer;
660
+ @end
661
+
662
+ typedef SWIFT_ENUM_NAMED(NSInteger, NPrinterStatus, "NPrinterStatus", open) {
663
+ /// Ok.
664
+ NPrinterStatusOk = 0,
665
+ /// Out of paper.
666
+ NPrinterStatusOutOfPaper = 2,
667
+ /// Cover opened.
668
+ NPrinterStatusCoverOpened = 4,
669
+ /// Overheat.
670
+ NPrinterStatusOverheat = 8,
671
+ /// Paper jam.
672
+ NPrinterStatusPaperJam = 16,
673
+ };
674
+
675
+ typedef SWIFT_ENUM_NAMED(NSInteger, NPrinterType, "NPrinterType", open) {
676
+ /// None.
677
+ NPrinterTypeNone = 0,
678
+ /// Nemonic (MIP-001).
679
+ NPrinterTypeNemonic = 1,
680
+ /// Nemonic Label (MIP-001L).
681
+ NPrinterTypeNemonicLabel = 2,
682
+ /// Nemonic mini (MIP-101).
683
+ NPrinterTypeNemonicMini = 3,
684
+ /// Nemonic AI (MIP-201).
685
+ NPrinterTypeNemonicMip201 = 4,
686
+ };
687
+
688
+ typedef SWIFT_ENUM_NAMED(NSInteger, NResult, "NResult", open) {
689
+ /// Ok.
690
+ NResultOk = 0x00,
691
+ /// Timeout.
692
+ NResultTimeout = -64,
693
+ /// Canceled.
694
+ NResultCanceled = -65,
695
+ /// Battery low.
696
+ NResultBatteryLow = -70,
697
+ /// Battery needs charging.
698
+ NResultBatteryNeedCharge = -71,
699
+ /// Paper not matched.
700
+ NResultPaperNotMatched = -80,
701
+ /// Unavailable cartridge.
702
+ NResultUnavailableCartridge = -81,
703
+ /// Bluetooth not supported.
704
+ NResultBluetoothUnsupported = -100,
705
+ /// Bluetooth disabled.
706
+ NResultBluetoothDisabled = -101,
707
+ /// No Bluetooth permission
708
+ NResultBluetoothNoPermission = -102,
709
+ /// Bluetooth resetting.(only iOS)
710
+ NResultBluetoothResetting = -103,
711
+ /// Bluetooth connection canceled or disabled.(only iOS)
712
+ NResultCanceledOrBluetoothDisabled = -104,
713
+ /// Bluetooth unknown.(only iOS)
714
+ NResultBluetoothUnknown = -105,
715
+ /// No location permission.(only Android)
716
+ NResultLocationNoPermission = -110,
717
+ /// Location disabled.(only Android)
718
+ NResultLocationDisabled = -111,
719
+ /// Printer scan failed.
720
+ NResultScanFailed = -200,
721
+ /// No selected printer.
722
+ NResultNoSelectedPrinter = -300,
723
+ /// Not connected.
724
+ NResultNotConnected = -301,
725
+ /// Already connected.
726
+ NResultAlreadyConnected = -302,
727
+ /// Bluetooth device not found.(only iOS)
728
+ NResultNotFound = -303,
729
+ /// Bluetooth is not connectable.(only iOS)
730
+ NResultNotConnectable = -304,
731
+ /// Socket error.
732
+ NResultSocketError = -305,
733
+ /// Connect error.
734
+ NResultConnectError = -306,
735
+ /// Connect failed.
736
+ NResultConnectFailed = -307,
737
+ /// Session error.
738
+ NResultSessionError = -308,
739
+ /// Connect service not found.
740
+ NResultConnectServiceNotFound = -309,
741
+ /// Unsupported connect mode.
742
+ NResultConnectUnsupportedMode = -310,
743
+ /// IO receive error.
744
+ NResultIoReceiveError = -400,
745
+ /// IO send error.
746
+ NResultIoSendError = -401,
747
+ /// Send failed.
748
+ NResultSendFailed = -402,
749
+ /// Unknown.
750
+ NResultUnknown = -500,
751
+ /// Invalid parameter.
752
+ NResultInvalidParameter = -501,
753
+ /// Not matched printer type.
754
+ NResultNotMatchedPrinterType = -502,
755
+ /// No delegate.
756
+ NResultNoDelegate = -503,
757
+ /// Not matched printer command result format.
758
+ NResultNotMatchedCommandResultFormat = -504,
759
+ /// Invalid printer name.
760
+ NResultInvalidPrinterName = -505,
761
+ /// Invalid printer result.
762
+ NResultInvalidPrinterResult = -506,
763
+ /// Printer result failed.
764
+ NResultPrinterResultFailed = -507,
765
+ /// Unsupported device.
766
+ NResultUnsupportedDevice = -508,
767
+ };
768
+
769
+ SWIFT_CLASS_NAMED("NResultPrintable")
770
+ @interface NResultPrintable : NSObject
771
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
772
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
773
+ @end
774
+
775
+ SWIFT_CLASS_NAMED("NResultString")
776
+ @interface NResultString : NSObject
777
+ /// Basic constructor.
778
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
779
+ @end
780
+
781
+ SWIFT_CLASS_NAMED("NSDKInfo")
782
+ @interface SDKInfo : NSObject
783
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
784
+ @end
785
+
786
+ #endif
787
+ #if __has_attribute(external_source_symbol)
788
+ # pragma clang attribute pop
789
+ #endif
790
+ #if defined(__cplusplus)
791
+ #endif
792
+ #pragma clang diagnostic pop
793
+ #endif
794
+
795
+ #else
796
+ #error unsupported Swift architecture
797
+ #endif