react-native-earl-thermal-printer 1.0.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.
- package/README.md +441 -0
- package/android/build/.transforms/9bdecbc31aaf57a08a337d36d73153ec/results.bin +1 -0
- package/android/build/.transforms/9bdecbc31aaf57a08a337d36d73153ec/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/bc167481fd58833142c92ba32b0fc3e3/results.bin +1 -0
- package/android/build/.transforms/bc167481fd58833142c92ba32b0fc3e3/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/com/pinmi/react/printer/BuildConfig.java +10 -0
- package/android/build/generated/source/codegen/java/com/pinmi/react/printer/NativeBLEPrinterSpec.java +70 -0
- package/android/build/generated/source/codegen/java/com/pinmi/react/printer/NativeNetPrinterSpec.java +70 -0
- package/android/build/generated/source/codegen/java/com/pinmi/react/printer/NativeUSBPrinterSpec.java +62 -0
- package/android/build/generated/source/codegen/jni/CMakeLists.txt +46 -0
- package/android/build/generated/source/codegen/jni/RNThermalReceiptPrinterSpec-generated.cpp +190 -0
- package/android/build/generated/source/codegen/jni/RNThermalReceiptPrinterSpec.h +49 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/ComponentDescriptors.h +22 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/EventEmitters.cpp +18 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/EventEmitters.h +19 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/Props.cpp +21 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/Props.h +20 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/RNThermalReceiptPrinterSpecJSI-generated.cpp +205 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/RNThermalReceiptPrinterSpecJSI.h +355 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/ShadowNodes.cpp +19 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/ShadowNodes.h +25 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/States.cpp +18 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNThermalReceiptPrinterSpec/States.h +23 -0
- package/android/build/generated/source/codegen/schema.json +514 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +13 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +5 -0
- package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/R.txt +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merged.dir/values/values.xml +4 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/NativeBLEPrinterSpec.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/NativeNetPrinterSpec.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/NativeUSBPrinterSpec.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/RNBLEPrinterModule.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/RNNetPrinterModule.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/RNPrinterModule.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/RNPrinterPackage.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/RNUSBPrinterModule.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/BLEPrinterAdapter$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/BLEPrinterAdapter.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/BLEPrinterDevice.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/BLEPrinterDeviceId.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/NetPrinterAdapter$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/NetPrinterAdapter$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/NetPrinterAdapter.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/NetPrinterDevice.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/NetPrinterDeviceId.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/PrinterAdapter.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/PrinterDevice.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/PrinterDeviceId.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/USBPrinterAdapter$1.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/USBPrinterAdapter$2.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/USBPrinterAdapter.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/USBPrinterDevice.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/pinmi/react/printer/adapter/USBPrinterDeviceId.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +3 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +23 -0
- package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +13 -0
- package/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
- package/android/build/intermediates/packaged_res/debug/values/values.xml +4 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +2 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +37 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build.gradle +30 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/android/gradlew +160 -0
- package/android/gradlew.bat +90 -0
- package/android/src/androidTest/java/com/pinmi/react/printer/ExampleInstrumentedTest.java +26 -0
- package/android/src/main/AndroidManifest.xml +10 -0
- package/android/src/main/java/com/pinmi/react/printer/RNBLEPrinterModule.java +91 -0
- package/android/src/main/java/com/pinmi/react/printer/RNNetPrinterModule.java +95 -0
- package/android/src/main/java/com/pinmi/react/printer/RNPrinterModule.java +24 -0
- package/android/src/main/java/com/pinmi/react/printer/RNPrinterPackage.java +57 -0
- package/android/src/main/java/com/pinmi/react/printer/RNUSBPrinterModule.java +79 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/BLEPrinterAdapter.java +391 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/BLEPrinterDevice.java +33 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/BLEPrinterDeviceId.java +38 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/NetPrinterAdapter.java +433 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/NetPrinterDevice.java +30 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/NetPrinterDeviceId.java +48 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/PrinterAdapter.java +29 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/PrinterDevice.java +17 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/PrinterDeviceId.java +8 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/USBPrinterAdapter.java +468 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/USBPrinterDevice.java +41 -0
- package/android/src/main/java/com/pinmi/react/printer/adapter/USBPrinterDeviceId.java +49 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/android/src/test/java/com/pinmi/react/printer/ExampleUnitTest.java +17 -0
- package/dist/NativeBLEPrinter.d.ts +15 -0
- package/dist/NativeBLEPrinter.d.ts.map +1 -0
- package/dist/NativeBLEPrinter.js +3 -0
- package/dist/NativeBLEPrinter.js.map +1 -0
- package/dist/NativeNetPrinter.d.ts +15 -0
- package/dist/NativeNetPrinter.d.ts.map +1 -0
- package/dist/NativeNetPrinter.js +3 -0
- package/dist/NativeNetPrinter.js.map +1 -0
- package/dist/NativeUSBPrinter.d.ts +13 -0
- package/dist/NativeUSBPrinter.d.ts.map +1 -0
- package/dist/NativeUSBPrinter.js +3 -0
- package/dist/NativeUSBPrinter.js.map +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/EPToolkit.d.ts +9 -0
- package/dist/utils/EPToolkit.d.ts.map +1 -0
- package/dist/utils/EPToolkit.js +161 -0
- package/dist/utils/EPToolkit.js.map +1 -0
- package/dist/utils/buffer-helper.d.ts +12 -0
- package/dist/utils/buffer-helper.d.ts.map +1 -0
- package/dist/utils/buffer-helper.js +32 -0
- package/dist/utils/buffer-helper.js.map +1 -0
- package/ios/PrinterSDK/PrinterSDK.h +74 -0
- package/ios/PrinterSDK/libPrinterSDK.a +0 -0
- package/ios/RNBLEPrinter.h +24 -0
- package/ios/RNBLEPrinter.mm +251 -0
- package/ios/RNNetPrinter.h +25 -0
- package/ios/RNNetPrinter.mm +306 -0
- package/ios/RNThermalReceiptPrinter.xcodeproj/project.pbxproj +294 -0
- package/ios/RNThermalReceiptPrinter.xcworkspace/contents.xcworkspacedata +9 -0
- package/ios/RNUSBPrinter.h +19 -0
- package/ios/RNUSBPrinter.mm +80 -0
- package/package.json +70 -0
- package/react-native-earl-thermal-printer.podspec +22 -0
- package/src/NativeBLEPrinter.ts +16 -0
- package/src/NativeNetPrinter.ts +16 -0
- package/src/NativeUSBPrinter.ts +14 -0
- package/src/index.ts +160 -0
- package/src/utils/EPToolkit.ts +193 -0
- package/src/utils/buffer-helper.ts +42 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateModuleJniCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "RNThermalReceiptPrinterSpec.h"
|
|
12
|
+
|
|
13
|
+
namespace facebook {
|
|
14
|
+
namespace react {
|
|
15
|
+
|
|
16
|
+
static facebook::jsi::Value __hostFunction_NativeBLEPrinterSpecJSI_init(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
17
|
+
static jmethodID cachedMethodId = nullptr;
|
|
18
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "init", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static facebook::jsi::Value __hostFunction_NativeBLEPrinterSpecJSI_getDeviceList(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
22
|
+
static jmethodID cachedMethodId = nullptr;
|
|
23
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getDeviceList", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static facebook::jsi::Value __hostFunction_NativeBLEPrinterSpecJSI_connectPrinter(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
27
|
+
static jmethodID cachedMethodId = nullptr;
|
|
28
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "connectPrinter", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static facebook::jsi::Value __hostFunction_NativeBLEPrinterSpecJSI_closeConn(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
32
|
+
static jmethodID cachedMethodId = nullptr;
|
|
33
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "closeConn", "()V", args, count, cachedMethodId);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static facebook::jsi::Value __hostFunction_NativeBLEPrinterSpecJSI_printRawData(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
37
|
+
static jmethodID cachedMethodId = nullptr;
|
|
38
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "printRawData", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static facebook::jsi::Value __hostFunction_NativeBLEPrinterSpecJSI_printImageData(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
42
|
+
static jmethodID cachedMethodId = nullptr;
|
|
43
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "printImageData", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static facebook::jsi::Value __hostFunction_NativeBLEPrinterSpecJSI_printQrCode(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
47
|
+
static jmethodID cachedMethodId = nullptr;
|
|
48
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "printQrCode", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static facebook::jsi::Value __hostFunction_NativeBLEPrinterSpecJSI_addListener(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
52
|
+
static jmethodID cachedMethodId = nullptr;
|
|
53
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "addListener", "(Ljava/lang/String;)V", args, count, cachedMethodId);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static facebook::jsi::Value __hostFunction_NativeBLEPrinterSpecJSI_removeListeners(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
57
|
+
static jmethodID cachedMethodId = nullptr;
|
|
58
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "removeListeners", "(D)V", args, count, cachedMethodId);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
NativeBLEPrinterSpecJSI::NativeBLEPrinterSpecJSI(const JavaTurboModule::InitParams ¶ms)
|
|
62
|
+
: JavaTurboModule(params) {
|
|
63
|
+
methodMap_["init"] = MethodMetadata {0, __hostFunction_NativeBLEPrinterSpecJSI_init};
|
|
64
|
+
methodMap_["getDeviceList"] = MethodMetadata {0, __hostFunction_NativeBLEPrinterSpecJSI_getDeviceList};
|
|
65
|
+
methodMap_["connectPrinter"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterSpecJSI_connectPrinter};
|
|
66
|
+
methodMap_["closeConn"] = MethodMetadata {0, __hostFunction_NativeBLEPrinterSpecJSI_closeConn};
|
|
67
|
+
methodMap_["printRawData"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterSpecJSI_printRawData};
|
|
68
|
+
methodMap_["printImageData"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterSpecJSI_printImageData};
|
|
69
|
+
methodMap_["printQrCode"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterSpecJSI_printQrCode};
|
|
70
|
+
methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterSpecJSI_addListener};
|
|
71
|
+
methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterSpecJSI_removeListeners};
|
|
72
|
+
}
|
|
73
|
+
static facebook::jsi::Value __hostFunction_NativeNetPrinterSpecJSI_init(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
74
|
+
static jmethodID cachedMethodId = nullptr;
|
|
75
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "init", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static facebook::jsi::Value __hostFunction_NativeNetPrinterSpecJSI_getDeviceList(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
79
|
+
static jmethodID cachedMethodId = nullptr;
|
|
80
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getDeviceList", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static facebook::jsi::Value __hostFunction_NativeNetPrinterSpecJSI_connectPrinter(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
84
|
+
static jmethodID cachedMethodId = nullptr;
|
|
85
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "connectPrinter", "(Ljava/lang/String;DLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
static facebook::jsi::Value __hostFunction_NativeNetPrinterSpecJSI_closeConn(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
89
|
+
static jmethodID cachedMethodId = nullptr;
|
|
90
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "closeConn", "()V", args, count, cachedMethodId);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
static facebook::jsi::Value __hostFunction_NativeNetPrinterSpecJSI_printRawData(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
94
|
+
static jmethodID cachedMethodId = nullptr;
|
|
95
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "printRawData", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
static facebook::jsi::Value __hostFunction_NativeNetPrinterSpecJSI_printImageData(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
99
|
+
static jmethodID cachedMethodId = nullptr;
|
|
100
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "printImageData", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static facebook::jsi::Value __hostFunction_NativeNetPrinterSpecJSI_printQrCode(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
104
|
+
static jmethodID cachedMethodId = nullptr;
|
|
105
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "printQrCode", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
static facebook::jsi::Value __hostFunction_NativeNetPrinterSpecJSI_addListener(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
109
|
+
static jmethodID cachedMethodId = nullptr;
|
|
110
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "addListener", "(Ljava/lang/String;)V", args, count, cachedMethodId);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static facebook::jsi::Value __hostFunction_NativeNetPrinterSpecJSI_removeListeners(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
114
|
+
static jmethodID cachedMethodId = nullptr;
|
|
115
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "removeListeners", "(D)V", args, count, cachedMethodId);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
NativeNetPrinterSpecJSI::NativeNetPrinterSpecJSI(const JavaTurboModule::InitParams ¶ms)
|
|
119
|
+
: JavaTurboModule(params) {
|
|
120
|
+
methodMap_["init"] = MethodMetadata {0, __hostFunction_NativeNetPrinterSpecJSI_init};
|
|
121
|
+
methodMap_["getDeviceList"] = MethodMetadata {0, __hostFunction_NativeNetPrinterSpecJSI_getDeviceList};
|
|
122
|
+
methodMap_["connectPrinter"] = MethodMetadata {2, __hostFunction_NativeNetPrinterSpecJSI_connectPrinter};
|
|
123
|
+
methodMap_["closeConn"] = MethodMetadata {0, __hostFunction_NativeNetPrinterSpecJSI_closeConn};
|
|
124
|
+
methodMap_["printRawData"] = MethodMetadata {1, __hostFunction_NativeNetPrinterSpecJSI_printRawData};
|
|
125
|
+
methodMap_["printImageData"] = MethodMetadata {1, __hostFunction_NativeNetPrinterSpecJSI_printImageData};
|
|
126
|
+
methodMap_["printQrCode"] = MethodMetadata {1, __hostFunction_NativeNetPrinterSpecJSI_printQrCode};
|
|
127
|
+
methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeNetPrinterSpecJSI_addListener};
|
|
128
|
+
methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeNetPrinterSpecJSI_removeListeners};
|
|
129
|
+
}
|
|
130
|
+
static facebook::jsi::Value __hostFunction_NativeUSBPrinterSpecJSI_init(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
131
|
+
static jmethodID cachedMethodId = nullptr;
|
|
132
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "init", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static facebook::jsi::Value __hostFunction_NativeUSBPrinterSpecJSI_getDeviceList(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
136
|
+
static jmethodID cachedMethodId = nullptr;
|
|
137
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getDeviceList", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
static facebook::jsi::Value __hostFunction_NativeUSBPrinterSpecJSI_connectPrinter(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
141
|
+
static jmethodID cachedMethodId = nullptr;
|
|
142
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "connectPrinter", "(DDLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
static facebook::jsi::Value __hostFunction_NativeUSBPrinterSpecJSI_closeConn(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
146
|
+
static jmethodID cachedMethodId = nullptr;
|
|
147
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "closeConn", "()V", args, count, cachedMethodId);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
static facebook::jsi::Value __hostFunction_NativeUSBPrinterSpecJSI_printRawData(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
151
|
+
static jmethodID cachedMethodId = nullptr;
|
|
152
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "printRawData", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
static facebook::jsi::Value __hostFunction_NativeUSBPrinterSpecJSI_printImageData(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
156
|
+
static jmethodID cachedMethodId = nullptr;
|
|
157
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "printImageData", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
static facebook::jsi::Value __hostFunction_NativeUSBPrinterSpecJSI_printQrCode(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
161
|
+
static jmethodID cachedMethodId = nullptr;
|
|
162
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "printQrCode", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
NativeUSBPrinterSpecJSI::NativeUSBPrinterSpecJSI(const JavaTurboModule::InitParams ¶ms)
|
|
166
|
+
: JavaTurboModule(params) {
|
|
167
|
+
methodMap_["init"] = MethodMetadata {0, __hostFunction_NativeUSBPrinterSpecJSI_init};
|
|
168
|
+
methodMap_["getDeviceList"] = MethodMetadata {0, __hostFunction_NativeUSBPrinterSpecJSI_getDeviceList};
|
|
169
|
+
methodMap_["connectPrinter"] = MethodMetadata {2, __hostFunction_NativeUSBPrinterSpecJSI_connectPrinter};
|
|
170
|
+
methodMap_["closeConn"] = MethodMetadata {0, __hostFunction_NativeUSBPrinterSpecJSI_closeConn};
|
|
171
|
+
methodMap_["printRawData"] = MethodMetadata {1, __hostFunction_NativeUSBPrinterSpecJSI_printRawData};
|
|
172
|
+
methodMap_["printImageData"] = MethodMetadata {1, __hostFunction_NativeUSBPrinterSpecJSI_printImageData};
|
|
173
|
+
methodMap_["printQrCode"] = MethodMetadata {1, __hostFunction_NativeUSBPrinterSpecJSI_printQrCode};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
std::shared_ptr<TurboModule> RNThermalReceiptPrinterSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) {
|
|
177
|
+
if (moduleName == "RNBLEPrinter") {
|
|
178
|
+
return std::make_shared<NativeBLEPrinterSpecJSI>(params);
|
|
179
|
+
}
|
|
180
|
+
if (moduleName == "RNNetPrinter") {
|
|
181
|
+
return std::make_shared<NativeNetPrinterSpecJSI>(params);
|
|
182
|
+
}
|
|
183
|
+
if (moduleName == "RNUSBPrinter") {
|
|
184
|
+
return std::make_shared<NativeUSBPrinterSpecJSI>(params);
|
|
185
|
+
}
|
|
186
|
+
return nullptr;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
} // namespace react
|
|
190
|
+
} // namespace facebook
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateModuleJniH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include <ReactCommon/JavaTurboModule.h>
|
|
14
|
+
#include <ReactCommon/TurboModule.h>
|
|
15
|
+
#include <jsi/jsi.h>
|
|
16
|
+
|
|
17
|
+
namespace facebook {
|
|
18
|
+
namespace react {
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* JNI C++ class for module 'NativeBLEPrinter'
|
|
22
|
+
*/
|
|
23
|
+
class JSI_EXPORT NativeBLEPrinterSpecJSI : public JavaTurboModule {
|
|
24
|
+
public:
|
|
25
|
+
NativeBLEPrinterSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* JNI C++ class for module 'NativeNetPrinter'
|
|
30
|
+
*/
|
|
31
|
+
class JSI_EXPORT NativeNetPrinterSpecJSI : public JavaTurboModule {
|
|
32
|
+
public:
|
|
33
|
+
NativeNetPrinterSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* JNI C++ class for module 'NativeUSBPrinter'
|
|
38
|
+
*/
|
|
39
|
+
class JSI_EXPORT NativeUSBPrinterSpecJSI : public JavaTurboModule {
|
|
40
|
+
public:
|
|
41
|
+
NativeUSBPrinterSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
JSI_EXPORT
|
|
46
|
+
std::shared_ptr<TurboModule> RNThermalReceiptPrinterSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
47
|
+
|
|
48
|
+
} // namespace react
|
|
49
|
+
} // namespace facebook
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include <react/renderer/components/RNThermalReceiptPrinterSpec/ShadowNodes.h>
|
|
14
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
+
|
|
16
|
+
namespace facebook {
|
|
17
|
+
namespace react {
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
} // namespace react
|
|
22
|
+
} // namespace facebook
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include <react/renderer/components/RNThermalReceiptPrinterSpec/EventEmitters.h>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
namespace facebook {
|
|
15
|
+
namespace react {
|
|
16
|
+
|
|
17
|
+
} // namespace react
|
|
18
|
+
} // namespace facebook
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace facebook {
|
|
16
|
+
namespace react {
|
|
17
|
+
|
|
18
|
+
} // namespace react
|
|
19
|
+
} // namespace facebook
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GeneratePropsCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include <react/renderer/components/RNThermalReceiptPrinterSpec/Props.h>
|
|
12
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
13
|
+
#include <react/renderer/core/propsConversions.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook {
|
|
16
|
+
namespace react {
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
} // namespace react
|
|
21
|
+
} // namespace facebook
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GeneratePropsH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
namespace facebook {
|
|
15
|
+
namespace react {
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
} // namespace react
|
|
20
|
+
} // namespace facebook
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "RNThermalReceiptPrinterSpecJSI.h"
|
|
11
|
+
|
|
12
|
+
namespace facebook {
|
|
13
|
+
namespace react {
|
|
14
|
+
|
|
15
|
+
static jsi::Value __hostFunction_NativeBLEPrinterCxxSpecJSI_init(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
16
|
+
return static_cast<NativeBLEPrinterCxxSpecJSI *>(&turboModule)->init(
|
|
17
|
+
rt
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
static jsi::Value __hostFunction_NativeBLEPrinterCxxSpecJSI_getDeviceList(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
21
|
+
return static_cast<NativeBLEPrinterCxxSpecJSI *>(&turboModule)->getDeviceList(
|
|
22
|
+
rt
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
static jsi::Value __hostFunction_NativeBLEPrinterCxxSpecJSI_connectPrinter(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
26
|
+
return static_cast<NativeBLEPrinterCxxSpecJSI *>(&turboModule)->connectPrinter(
|
|
27
|
+
rt,
|
|
28
|
+
args[0].asString(rt)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
static jsi::Value __hostFunction_NativeBLEPrinterCxxSpecJSI_closeConn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
32
|
+
static_cast<NativeBLEPrinterCxxSpecJSI *>(&turboModule)->closeConn(
|
|
33
|
+
rt
|
|
34
|
+
);
|
|
35
|
+
return jsi::Value::undefined();
|
|
36
|
+
}
|
|
37
|
+
static jsi::Value __hostFunction_NativeBLEPrinterCxxSpecJSI_printRawData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
38
|
+
return static_cast<NativeBLEPrinterCxxSpecJSI *>(&turboModule)->printRawData(
|
|
39
|
+
rt,
|
|
40
|
+
args[0].asString(rt)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
static jsi::Value __hostFunction_NativeBLEPrinterCxxSpecJSI_printImageData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
44
|
+
return static_cast<NativeBLEPrinterCxxSpecJSI *>(&turboModule)->printImageData(
|
|
45
|
+
rt,
|
|
46
|
+
args[0].asString(rt)
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
static jsi::Value __hostFunction_NativeBLEPrinterCxxSpecJSI_printQrCode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
50
|
+
return static_cast<NativeBLEPrinterCxxSpecJSI *>(&turboModule)->printQrCode(
|
|
51
|
+
rt,
|
|
52
|
+
args[0].asString(rt)
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
static jsi::Value __hostFunction_NativeBLEPrinterCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
56
|
+
static_cast<NativeBLEPrinterCxxSpecJSI *>(&turboModule)->addListener(
|
|
57
|
+
rt,
|
|
58
|
+
args[0].asString(rt)
|
|
59
|
+
);
|
|
60
|
+
return jsi::Value::undefined();
|
|
61
|
+
}
|
|
62
|
+
static jsi::Value __hostFunction_NativeBLEPrinterCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
63
|
+
static_cast<NativeBLEPrinterCxxSpecJSI *>(&turboModule)->removeListeners(
|
|
64
|
+
rt,
|
|
65
|
+
args[0].asNumber()
|
|
66
|
+
);
|
|
67
|
+
return jsi::Value::undefined();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
NativeBLEPrinterCxxSpecJSI::NativeBLEPrinterCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
71
|
+
: TurboModule("RNBLEPrinter", jsInvoker) {
|
|
72
|
+
methodMap_["init"] = MethodMetadata {0, __hostFunction_NativeBLEPrinterCxxSpecJSI_init};
|
|
73
|
+
methodMap_["getDeviceList"] = MethodMetadata {0, __hostFunction_NativeBLEPrinterCxxSpecJSI_getDeviceList};
|
|
74
|
+
methodMap_["connectPrinter"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterCxxSpecJSI_connectPrinter};
|
|
75
|
+
methodMap_["closeConn"] = MethodMetadata {0, __hostFunction_NativeBLEPrinterCxxSpecJSI_closeConn};
|
|
76
|
+
methodMap_["printRawData"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterCxxSpecJSI_printRawData};
|
|
77
|
+
methodMap_["printImageData"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterCxxSpecJSI_printImageData};
|
|
78
|
+
methodMap_["printQrCode"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterCxxSpecJSI_printQrCode};
|
|
79
|
+
methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterCxxSpecJSI_addListener};
|
|
80
|
+
methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeBLEPrinterCxxSpecJSI_removeListeners};
|
|
81
|
+
}
|
|
82
|
+
static jsi::Value __hostFunction_NativeNetPrinterCxxSpecJSI_init(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
83
|
+
return static_cast<NativeNetPrinterCxxSpecJSI *>(&turboModule)->init(
|
|
84
|
+
rt
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
static jsi::Value __hostFunction_NativeNetPrinterCxxSpecJSI_getDeviceList(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
88
|
+
return static_cast<NativeNetPrinterCxxSpecJSI *>(&turboModule)->getDeviceList(
|
|
89
|
+
rt
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
static jsi::Value __hostFunction_NativeNetPrinterCxxSpecJSI_connectPrinter(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
93
|
+
return static_cast<NativeNetPrinterCxxSpecJSI *>(&turboModule)->connectPrinter(
|
|
94
|
+
rt,
|
|
95
|
+
args[0].asString(rt),
|
|
96
|
+
args[1].asNumber()
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
static jsi::Value __hostFunction_NativeNetPrinterCxxSpecJSI_closeConn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
100
|
+
static_cast<NativeNetPrinterCxxSpecJSI *>(&turboModule)->closeConn(
|
|
101
|
+
rt
|
|
102
|
+
);
|
|
103
|
+
return jsi::Value::undefined();
|
|
104
|
+
}
|
|
105
|
+
static jsi::Value __hostFunction_NativeNetPrinterCxxSpecJSI_printRawData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
106
|
+
return static_cast<NativeNetPrinterCxxSpecJSI *>(&turboModule)->printRawData(
|
|
107
|
+
rt,
|
|
108
|
+
args[0].asString(rt)
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
static jsi::Value __hostFunction_NativeNetPrinterCxxSpecJSI_printImageData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
112
|
+
return static_cast<NativeNetPrinterCxxSpecJSI *>(&turboModule)->printImageData(
|
|
113
|
+
rt,
|
|
114
|
+
args[0].asString(rt)
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
static jsi::Value __hostFunction_NativeNetPrinterCxxSpecJSI_printQrCode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
118
|
+
return static_cast<NativeNetPrinterCxxSpecJSI *>(&turboModule)->printQrCode(
|
|
119
|
+
rt,
|
|
120
|
+
args[0].asString(rt)
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
static jsi::Value __hostFunction_NativeNetPrinterCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
124
|
+
static_cast<NativeNetPrinterCxxSpecJSI *>(&turboModule)->addListener(
|
|
125
|
+
rt,
|
|
126
|
+
args[0].asString(rt)
|
|
127
|
+
);
|
|
128
|
+
return jsi::Value::undefined();
|
|
129
|
+
}
|
|
130
|
+
static jsi::Value __hostFunction_NativeNetPrinterCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
131
|
+
static_cast<NativeNetPrinterCxxSpecJSI *>(&turboModule)->removeListeners(
|
|
132
|
+
rt,
|
|
133
|
+
args[0].asNumber()
|
|
134
|
+
);
|
|
135
|
+
return jsi::Value::undefined();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
NativeNetPrinterCxxSpecJSI::NativeNetPrinterCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
139
|
+
: TurboModule("RNNetPrinter", jsInvoker) {
|
|
140
|
+
methodMap_["init"] = MethodMetadata {0, __hostFunction_NativeNetPrinterCxxSpecJSI_init};
|
|
141
|
+
methodMap_["getDeviceList"] = MethodMetadata {0, __hostFunction_NativeNetPrinterCxxSpecJSI_getDeviceList};
|
|
142
|
+
methodMap_["connectPrinter"] = MethodMetadata {2, __hostFunction_NativeNetPrinterCxxSpecJSI_connectPrinter};
|
|
143
|
+
methodMap_["closeConn"] = MethodMetadata {0, __hostFunction_NativeNetPrinterCxxSpecJSI_closeConn};
|
|
144
|
+
methodMap_["printRawData"] = MethodMetadata {1, __hostFunction_NativeNetPrinterCxxSpecJSI_printRawData};
|
|
145
|
+
methodMap_["printImageData"] = MethodMetadata {1, __hostFunction_NativeNetPrinterCxxSpecJSI_printImageData};
|
|
146
|
+
methodMap_["printQrCode"] = MethodMetadata {1, __hostFunction_NativeNetPrinterCxxSpecJSI_printQrCode};
|
|
147
|
+
methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeNetPrinterCxxSpecJSI_addListener};
|
|
148
|
+
methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeNetPrinterCxxSpecJSI_removeListeners};
|
|
149
|
+
}
|
|
150
|
+
static jsi::Value __hostFunction_NativeUSBPrinterCxxSpecJSI_init(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
151
|
+
return static_cast<NativeUSBPrinterCxxSpecJSI *>(&turboModule)->init(
|
|
152
|
+
rt
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
static jsi::Value __hostFunction_NativeUSBPrinterCxxSpecJSI_getDeviceList(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
156
|
+
return static_cast<NativeUSBPrinterCxxSpecJSI *>(&turboModule)->getDeviceList(
|
|
157
|
+
rt
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
static jsi::Value __hostFunction_NativeUSBPrinterCxxSpecJSI_connectPrinter(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
161
|
+
return static_cast<NativeUSBPrinterCxxSpecJSI *>(&turboModule)->connectPrinter(
|
|
162
|
+
rt,
|
|
163
|
+
args[0].asNumber(),
|
|
164
|
+
args[1].asNumber()
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
static jsi::Value __hostFunction_NativeUSBPrinterCxxSpecJSI_closeConn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
168
|
+
static_cast<NativeUSBPrinterCxxSpecJSI *>(&turboModule)->closeConn(
|
|
169
|
+
rt
|
|
170
|
+
);
|
|
171
|
+
return jsi::Value::undefined();
|
|
172
|
+
}
|
|
173
|
+
static jsi::Value __hostFunction_NativeUSBPrinterCxxSpecJSI_printRawData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
174
|
+
return static_cast<NativeUSBPrinterCxxSpecJSI *>(&turboModule)->printRawData(
|
|
175
|
+
rt,
|
|
176
|
+
args[0].asString(rt)
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
static jsi::Value __hostFunction_NativeUSBPrinterCxxSpecJSI_printImageData(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
180
|
+
return static_cast<NativeUSBPrinterCxxSpecJSI *>(&turboModule)->printImageData(
|
|
181
|
+
rt,
|
|
182
|
+
args[0].asString(rt)
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
static jsi::Value __hostFunction_NativeUSBPrinterCxxSpecJSI_printQrCode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
186
|
+
return static_cast<NativeUSBPrinterCxxSpecJSI *>(&turboModule)->printQrCode(
|
|
187
|
+
rt,
|
|
188
|
+
args[0].asString(rt)
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
NativeUSBPrinterCxxSpecJSI::NativeUSBPrinterCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
193
|
+
: TurboModule("RNUSBPrinter", jsInvoker) {
|
|
194
|
+
methodMap_["init"] = MethodMetadata {0, __hostFunction_NativeUSBPrinterCxxSpecJSI_init};
|
|
195
|
+
methodMap_["getDeviceList"] = MethodMetadata {0, __hostFunction_NativeUSBPrinterCxxSpecJSI_getDeviceList};
|
|
196
|
+
methodMap_["connectPrinter"] = MethodMetadata {2, __hostFunction_NativeUSBPrinterCxxSpecJSI_connectPrinter};
|
|
197
|
+
methodMap_["closeConn"] = MethodMetadata {0, __hostFunction_NativeUSBPrinterCxxSpecJSI_closeConn};
|
|
198
|
+
methodMap_["printRawData"] = MethodMetadata {1, __hostFunction_NativeUSBPrinterCxxSpecJSI_printRawData};
|
|
199
|
+
methodMap_["printImageData"] = MethodMetadata {1, __hostFunction_NativeUSBPrinterCxxSpecJSI_printImageData};
|
|
200
|
+
methodMap_["printQrCode"] = MethodMetadata {1, __hostFunction_NativeUSBPrinterCxxSpecJSI_printQrCode};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
} // namespace react
|
|
205
|
+
} // namespace facebook
|