react-native-esc-pos-printer-chunyinli 4.5.2
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 +3 -0
- package/android/build.gradle +93 -0
- package/android/generated/java/com/escposprinter/NativeEscPosPrinterDiscoverySpec.java +125 -0
- package/android/generated/java/com/escposprinter/NativeEscPosPrinterSpec.java +364 -0
- package/android/generated/jni/CMakeLists.txt +28 -0
- package/android/generated/jni/RNEscPosPrinterSpec-generated.cpp +198 -0
- package/android/generated/jni/RNEscPosPrinterSpec.h +39 -0
- package/android/generated/jni/react/renderer/components/RNEscPosPrinterSpec/RNEscPosPrinterSpecJSI-generated.cpp +250 -0
- package/android/generated/jni/react/renderer/components/RNEscPosPrinterSpec/RNEscPosPrinterSpecJSI.h +366 -0
- package/android/gradle.properties +5 -0
- package/android/libs/ePOS2.jar +0 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/reactnativeescposprinter/EposStringHelper.java +429 -0
- package/android/src/main/java/com/reactnativeescposprinter/EscPosPrinterDiscoveryModule.java +260 -0
- package/android/src/main/java/com/reactnativeescposprinter/EscPosPrinterModule.java +430 -0
- package/android/src/main/java/com/reactnativeescposprinter/EscPosPrinterPackage.java +62 -0
- package/android/src/main/java/com/reactnativeescposprinter/ImageManager.java +48 -0
- package/android/src/main/java/com/reactnativeescposprinter/PrinterCallback.java +8 -0
- package/android/src/main/java/com/reactnativeescposprinter/PrinterDelegate.java +13 -0
- package/android/src/main/java/com/reactnativeescposprinter/ThePrinter.java +426 -0
- package/android/src/main/java/com/reactnativeescposprinter/ThePrinterManager.java +41 -0
- package/android/src/main/jniLibs/arm64-v8a/libepos2.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libepos2.so +0 -0
- package/android/src/main/jniLibs/x86/libepos2.so +0 -0
- package/android/src/main/jniLibs/x86_64/libepos2.so +0 -0
- package/android/src/oldarch/java/com/reactnativeescposprinter/NativeEscPosPrinterDiscoverySpec.java +124 -0
- package/android/src/oldarch/java/com/reactnativeescposprinter/NativeEscPosPrinterSpec.java +363 -0
- package/ios/EposStringHelper.h +13 -0
- package/ios/EposStringHelper.m +366 -0
- package/ios/EscPosPrinter.h +22 -0
- package/ios/EscPosPrinter.mm +545 -0
- package/ios/EscPosPrinter.xcodeproj/project.pbxproj +345 -0
- package/ios/EscPosPrinterDiscovery.h +17 -0
- package/ios/EscPosPrinterDiscovery.mm +134 -0
- package/ios/ImageManager.h +9 -0
- package/ios/ImageManager.m +52 -0
- package/ios/PrinterSDK/libepos2.xcframework/Headers/ePOS2.h +1808 -0
- package/ios/PrinterSDK/libepos2.xcframework/Info.plist +48 -0
- package/ios/PrinterSDK/libepos2.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/PrinterSDK/libepos2.xcframework/_CodeSignature/CodeRequirements +0 -0
- package/ios/PrinterSDK/libepos2.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/PrinterSDK/libepos2.xcframework/_CodeSignature/CodeResources +158 -0
- package/ios/PrinterSDK/libepos2.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/PrinterSDK/libepos2.xcframework/ios-arm64/libepos2.a +0 -0
- package/ios/PrinterSDK/libepos2.xcframework/ios-arm64_x86_64-simulator/libepos2.a +0 -0
- package/ios/ThePrinter.h +151 -0
- package/ios/ThePrinter.m +578 -0
- package/ios/ThePrinterManager.h +17 -0
- package/ios/ThePrinterManager.m +70 -0
- package/ios/generated/RNEscPosPrinterSpec/RNEscPosPrinterSpec-generated.mm +255 -0
- package/ios/generated/RNEscPosPrinterSpec/RNEscPosPrinterSpec.h +1000 -0
- package/ios/generated/RNEscPosPrinterSpecJSI-generated.cpp +250 -0
- package/ios/generated/RNEscPosPrinterSpecJSI.h +366 -0
- package/lib/module/core/errors/PrinterDiscoveryError.js +15 -0
- package/lib/module/core/errors/PrinterDiscoveryError.js.map +1 -0
- package/lib/module/core/errors/PrinterError.js +15 -0
- package/lib/module/core/errors/PrinterError.js.map +1 -0
- package/lib/module/core/errors/index.js +5 -0
- package/lib/module/core/errors/index.js.map +1 -0
- package/lib/module/core/index.js +5 -0
- package/lib/module/core/index.js.map +1 -0
- package/lib/module/core/utils/constants.js +10 -0
- package/lib/module/core/utils/constants.js.map +1 -0
- package/lib/module/core/utils/index.js +5 -0
- package/lib/module/core/utils/index.js.map +1 -0
- package/lib/module/core/utils/permissions.js +62 -0
- package/lib/module/core/utils/permissions.js.map +1 -0
- package/lib/module/discovery/PrintersDiscovery.js +114 -0
- package/lib/module/discovery/PrintersDiscovery.js.map +1 -0
- package/lib/module/discovery/constants.js +86 -0
- package/lib/module/discovery/constants.js.map +1 -0
- package/lib/module/discovery/hooks/index.js +4 -0
- package/lib/module/discovery/hooks/index.js.map +1 -0
- package/lib/module/discovery/hooks/usePrintersDiscovery.js +56 -0
- package/lib/module/discovery/hooks/usePrintersDiscovery.js.map +1 -0
- package/lib/module/discovery/index.js +7 -0
- package/lib/module/discovery/index.js.map +1 -0
- package/lib/module/discovery/types.js +4 -0
- package/lib/module/discovery/types.js.map +1 -0
- package/lib/module/discovery/utils/errors.js +20 -0
- package/lib/module/discovery/utils/errors.js.map +1 -0
- package/lib/module/discovery/utils/index.js +4 -0
- package/lib/module/discovery/utils/index.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/printer/Printer.js +106 -0
- package/lib/module/printer/Printer.js.map +1 -0
- package/lib/module/printer/PrinterWrapper.js +316 -0
- package/lib/module/printer/PrinterWrapper.js.map +1 -0
- package/lib/module/printer/constants/enums/barcode.js +32 -0
- package/lib/module/printer/constants/enums/barcode.js.map +1 -0
- package/lib/module/printer/constants/enums/common.js +93 -0
- package/lib/module/printer/constants/enums/common.js.map +1 -0
- package/lib/module/printer/constants/enums/image.js +23 -0
- package/lib/module/printer/constants/enums/image.js.map +1 -0
- package/lib/module/printer/constants/enums/index.js +43 -0
- package/lib/module/printer/constants/enums/index.js.map +1 -0
- package/lib/module/printer/constants/enums/pulse.js +18 -0
- package/lib/module/printer/constants/enums/pulse.js.map +1 -0
- package/lib/module/printer/constants/enums/settings.js +56 -0
- package/lib/module/printer/constants/enums/settings.js.map +1 -0
- package/lib/module/printer/constants/enums/status.js +63 -0
- package/lib/module/printer/constants/enums/status.js.map +1 -0
- package/lib/module/printer/constants/enums/symbol.js +43 -0
- package/lib/module/printer/constants/enums/symbol.js.map +1 -0
- package/lib/module/printer/constants/enums/textStyle.js +19 -0
- package/lib/module/printer/constants/enums/textStyle.js.map +1 -0
- package/lib/module/printer/constants/index.js +7 -0
- package/lib/module/printer/constants/index.js.map +1 -0
- package/lib/module/printer/constants/layout.js +5 -0
- package/lib/module/printer/constants/layout.js.map +1 -0
- package/lib/module/printer/constants/valuesToKeysMappers.js +96 -0
- package/lib/module/printer/constants/valuesToKeysMappers.js.map +1 -0
- package/lib/module/printer/constants/valuesToMessagesMappers.js +200 -0
- package/lib/module/printer/constants/valuesToMessagesMappers.js.map +1 -0
- package/lib/module/printer/index.js +6 -0
- package/lib/module/printer/index.js.map +1 -0
- package/lib/module/printer/printHelpers/addTextLine.js +14 -0
- package/lib/module/printer/printHelpers/addTextLine.js.map +1 -0
- package/lib/module/printer/printHelpers/addViewShot.js +35 -0
- package/lib/module/printer/printHelpers/addViewShot.js.map +1 -0
- package/lib/module/printer/printHelpers/index.js +7 -0
- package/lib/module/printer/printHelpers/index.js.map +1 -0
- package/lib/module/printer/printHelpers/monitorPrinter.js +30 -0
- package/lib/module/printer/printHelpers/monitorPrinter.js.map +1 -0
- package/lib/module/printer/printHelpers/tryToConnectUntil.js +15 -0
- package/lib/module/printer/printHelpers/tryToConnectUntil.js.map +1 -0
- package/lib/module/printer/types.js +4 -0
- package/lib/module/printer/types.js.map +1 -0
- package/lib/module/printer/utils/BufferHelper.js +44 -0
- package/lib/module/printer/utils/BufferHelper.js.map +1 -0
- package/lib/module/printer/utils/errors.js +37 -0
- package/lib/module/printer/utils/errors.js.map +1 -0
- package/lib/module/printer/utils/index.js +7 -0
- package/lib/module/printer/utils/index.js.map +1 -0
- package/lib/module/printer/utils/layout/getFontACharsPerLine.js +97 -0
- package/lib/module/printer/utils/layout/getFontACharsPerLine.js.map +1 -0
- package/lib/module/printer/utils/layout/index.js +5 -0
- package/lib/module/printer/utils/layout/index.js.map +1 -0
- package/lib/module/printer/utils/layout/spaceBetween.js +63 -0
- package/lib/module/printer/utils/layout/spaceBetween.js.map +1 -0
- package/lib/module/printer/utils/parsers/index.js +5 -0
- package/lib/module/printer/utils/parsers/index.js.map +1 -0
- package/lib/module/printer/utils/parsers/parsePrinterSettings.js +17 -0
- package/lib/module/printer/utils/parsers/parsePrinterSettings.js.map +1 -0
- package/lib/module/printer/utils/parsers/parsePrinterStatus.js +17 -0
- package/lib/module/printer/utils/parsers/parsePrinterStatus.js.map +1 -0
- package/lib/module/specs/NativeEscPosPrinter.js +5 -0
- package/lib/module/specs/NativeEscPosPrinter.js.map +1 -0
- package/lib/module/specs/NativeEscPosPrinterDiscovery.js +5 -0
- package/lib/module/specs/NativeEscPosPrinterDiscovery.js.map +1 -0
- package/lib/module/specs/index.js +33 -0
- package/lib/module/specs/index.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/core/errors/PrinterDiscoveryError.d.ts +13 -0
- package/lib/typescript/src/core/errors/PrinterDiscoveryError.d.ts.map +1 -0
- package/lib/typescript/src/core/errors/PrinterError.d.ts +13 -0
- package/lib/typescript/src/core/errors/PrinterError.d.ts.map +1 -0
- package/lib/typescript/src/core/errors/index.d.ts +3 -0
- package/lib/typescript/src/core/errors/index.d.ts.map +1 -0
- package/lib/typescript/src/core/index.d.ts +3 -0
- package/lib/typescript/src/core/index.d.ts.map +1 -0
- package/lib/typescript/src/core/utils/constants.d.ts +2 -0
- package/lib/typescript/src/core/utils/constants.d.ts.map +1 -0
- package/lib/typescript/src/core/utils/index.d.ts +3 -0
- package/lib/typescript/src/core/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/core/utils/permissions.d.ts +3 -0
- package/lib/typescript/src/core/utils/permissions.d.ts.map +1 -0
- package/lib/typescript/src/discovery/PrintersDiscovery.d.ts +22 -0
- package/lib/typescript/src/discovery/PrintersDiscovery.d.ts.map +1 -0
- package/lib/typescript/src/discovery/constants.d.ts +90 -0
- package/lib/typescript/src/discovery/constants.d.ts.map +1 -0
- package/lib/typescript/src/discovery/hooks/index.d.ts +2 -0
- package/lib/typescript/src/discovery/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/discovery/hooks/usePrintersDiscovery.d.ts +11 -0
- package/lib/typescript/src/discovery/hooks/usePrintersDiscovery.d.ts.map +1 -0
- package/lib/typescript/src/discovery/index.d.ts +5 -0
- package/lib/typescript/src/discovery/index.d.ts.map +1 -0
- package/lib/typescript/src/discovery/types.d.ts +69 -0
- package/lib/typescript/src/discovery/types.d.ts.map +1 -0
- package/lib/typescript/src/discovery/utils/errors.d.ts +9 -0
- package/lib/typescript/src/discovery/utils/errors.d.ts.map +1 -0
- package/lib/typescript/src/discovery/utils/index.d.ts +2 -0
- package/lib/typescript/src/discovery/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/printer/Printer.d.ts +40 -0
- package/lib/typescript/src/printer/Printer.d.ts.map +1 -0
- package/lib/typescript/src/printer/PrinterWrapper.d.ts +36 -0
- package/lib/typescript/src/printer/PrinterWrapper.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/enums/barcode.d.ts +26 -0
- package/lib/typescript/src/printer/constants/enums/barcode.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/enums/common.d.ts +82 -0
- package/lib/typescript/src/printer/constants/enums/common.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/enums/image.d.ts +16 -0
- package/lib/typescript/src/printer/constants/enums/image.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/enums/index.d.ts +190 -0
- package/lib/typescript/src/printer/constants/enums/index.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/enums/pulse.d.ts +12 -0
- package/lib/typescript/src/printer/constants/enums/pulse.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/enums/settings.d.ts +48 -0
- package/lib/typescript/src/printer/constants/enums/settings.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/enums/status.d.ts +50 -0
- package/lib/typescript/src/printer/constants/enums/status.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/enums/symbol.d.ts +37 -0
- package/lib/typescript/src/printer/constants/enums/symbol.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/enums/textStyle.d.ts +13 -0
- package/lib/typescript/src/printer/constants/enums/textStyle.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/index.d.ts +5 -0
- package/lib/typescript/src/printer/constants/index.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/layout.d.ts +3 -0
- package/lib/typescript/src/printer/constants/layout.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/valuesToKeysMappers.d.ts +6 -0
- package/lib/typescript/src/printer/constants/valuesToKeysMappers.d.ts.map +1 -0
- package/lib/typescript/src/printer/constants/valuesToMessagesMappers.d.ts +112 -0
- package/lib/typescript/src/printer/constants/valuesToMessagesMappers.d.ts.map +1 -0
- package/lib/typescript/src/printer/index.d.ts +4 -0
- package/lib/typescript/src/printer/index.d.ts.map +1 -0
- package/lib/typescript/src/printer/printHelpers/addTextLine.d.ts +4 -0
- package/lib/typescript/src/printer/printHelpers/addTextLine.d.ts.map +1 -0
- package/lib/typescript/src/printer/printHelpers/addViewShot.d.ts +4 -0
- package/lib/typescript/src/printer/printHelpers/addViewShot.d.ts.map +1 -0
- package/lib/typescript/src/printer/printHelpers/index.d.ts +5 -0
- package/lib/typescript/src/printer/printHelpers/index.d.ts.map +1 -0
- package/lib/typescript/src/printer/printHelpers/monitorPrinter.d.ts +4 -0
- package/lib/typescript/src/printer/printHelpers/monitorPrinter.d.ts.map +1 -0
- package/lib/typescript/src/printer/printHelpers/tryToConnectUntil.d.ts +4 -0
- package/lib/typescript/src/printer/printHelpers/tryToConnectUntil.d.ts.map +1 -0
- package/lib/typescript/src/printer/types.d.ts +97 -0
- package/lib/typescript/src/printer/types.d.ts.map +1 -0
- package/lib/typescript/src/printer/utils/BufferHelper.d.ts +14 -0
- package/lib/typescript/src/printer/utils/BufferHelper.d.ts.map +1 -0
- package/lib/typescript/src/printer/utils/errors.d.ts +10 -0
- package/lib/typescript/src/printer/utils/errors.d.ts.map +1 -0
- package/lib/typescript/src/printer/utils/index.d.ts +5 -0
- package/lib/typescript/src/printer/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/printer/utils/layout/getFontACharsPerLine.d.ts +14 -0
- package/lib/typescript/src/printer/utils/layout/getFontACharsPerLine.d.ts.map +1 -0
- package/lib/typescript/src/printer/utils/layout/index.d.ts +3 -0
- package/lib/typescript/src/printer/utils/layout/index.d.ts.map +1 -0
- package/lib/typescript/src/printer/utils/layout/spaceBetween.d.ts +3 -0
- package/lib/typescript/src/printer/utils/layout/spaceBetween.d.ts.map +1 -0
- package/lib/typescript/src/printer/utils/parsers/index.d.ts +3 -0
- package/lib/typescript/src/printer/utils/parsers/index.d.ts.map +1 -0
- package/lib/typescript/src/printer/utils/parsers/parsePrinterSettings.d.ts +3 -0
- package/lib/typescript/src/printer/utils/parsers/parsePrinterSettings.d.ts.map +1 -0
- package/lib/typescript/src/printer/utils/parsers/parsePrinterStatus.d.ts +3 -0
- package/lib/typescript/src/printer/utils/parsers/parsePrinterStatus.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeEscPosPrinter.d.ts +243 -0
- package/lib/typescript/src/specs/NativeEscPosPrinter.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeEscPosPrinterDiscovery.d.ts +46 -0
- package/lib/typescript/src/specs/NativeEscPosPrinterDiscovery.d.ts.map +1 -0
- package/lib/typescript/src/specs/index.d.ts +6 -0
- package/lib/typescript/src/specs/index.d.ts.map +1 -0
- package/package.json +181 -0
- package/react-native-esc-pos-printer.podspec +24 -0
- package/react-native.config.js +12 -0
- package/scripts/movelib.js +66 -0
- package/src/core/errors/PrinterDiscoveryError.ts +14 -0
- package/src/core/errors/PrinterError.ts +14 -0
- package/src/core/errors/index.ts +2 -0
- package/src/core/index.ts +2 -0
- package/src/core/utils/constants.ts +12 -0
- package/src/core/utils/index.ts +2 -0
- package/src/core/utils/permissions.ts +92 -0
- package/src/discovery/PrintersDiscovery.tsx +166 -0
- package/src/discovery/constants.ts +101 -0
- package/src/discovery/hooks/index.ts +1 -0
- package/src/discovery/hooks/usePrintersDiscovery.ts +69 -0
- package/src/discovery/index.ts +4 -0
- package/src/discovery/types.ts +79 -0
- package/src/discovery/utils/errors.ts +37 -0
- package/src/discovery/utils/index.ts +1 -0
- package/src/index.tsx +2 -0
- package/src/printer/Printer.ts +158 -0
- package/src/printer/PrinterWrapper.ts +422 -0
- package/src/printer/constants/enums/barcode.ts +30 -0
- package/src/printer/constants/enums/common.ts +90 -0
- package/src/printer/constants/enums/image.ts +21 -0
- package/src/printer/constants/enums/index.ts +104 -0
- package/src/printer/constants/enums/pulse.ts +16 -0
- package/src/printer/constants/enums/settings.ts +54 -0
- package/src/printer/constants/enums/status.ts +61 -0
- package/src/printer/constants/enums/symbol.ts +41 -0
- package/src/printer/constants/enums/textStyle.ts +17 -0
- package/src/printer/constants/index.ts +4 -0
- package/src/printer/constants/layout.ts +3 -0
- package/src/printer/constants/valuesToKeysMappers.ts +179 -0
- package/src/printer/constants/valuesToMessagesMappers.ts +277 -0
- package/src/printer/index.ts +3 -0
- package/src/printer/printHelpers/addTextLine.ts +26 -0
- package/src/printer/printHelpers/addViewShot.ts +42 -0
- package/src/printer/printHelpers/index.ts +4 -0
- package/src/printer/printHelpers/monitorPrinter.ts +41 -0
- package/src/printer/printHelpers/tryToConnectUntil.ts +20 -0
- package/src/printer/types.ts +152 -0
- package/src/printer/utils/BufferHelper.ts +52 -0
- package/src/printer/utils/errors.ts +48 -0
- package/src/printer/utils/index.ts +4 -0
- package/src/printer/utils/layout/getFontACharsPerLine.ts +119 -0
- package/src/printer/utils/layout/index.ts +2 -0
- package/src/printer/utils/layout/spaceBetween.ts +96 -0
- package/src/printer/utils/parsers/index.ts +2 -0
- package/src/printer/utils/parsers/parsePrinterSettings.ts +30 -0
- package/src/printer/utils/parsers/parsePrinterStatus.ts +20 -0
- package/src/specs/NativeEscPosPrinter.ts +284 -0
- package/src/specs/NativeEscPosPrinterDiscovery.ts +48 -0
- package/src/specs/index.ts +48 -0
package/android/src/oldarch/java/com/reactnativeescposprinter/NativeEscPosPrinterDiscoverySpec.java
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
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: GenerateModuleJavaSpec.js
|
|
9
|
+
*
|
|
10
|
+
* @nolint
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
package com.escposprinter;
|
|
14
|
+
|
|
15
|
+
import com.facebook.proguard.annotations.DoNotStrip;
|
|
16
|
+
import com.facebook.react.bridge.Promise;
|
|
17
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
18
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
19
|
+
import com.facebook.react.bridge.ReactMethod;
|
|
20
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
21
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
22
|
+
import com.facebook.react.common.build.ReactBuildConfig;
|
|
23
|
+
import java.util.Arrays;
|
|
24
|
+
import java.util.HashSet;
|
|
25
|
+
import java.util.Map;
|
|
26
|
+
import java.util.Set;
|
|
27
|
+
import javax.annotation.Nonnull;
|
|
28
|
+
import javax.annotation.Nullable;
|
|
29
|
+
|
|
30
|
+
public abstract class NativeEscPosPrinterDiscoverySpec extends ReactContextBaseJavaModule{
|
|
31
|
+
public static final String NAME = "EscPosPrinterDiscovery";
|
|
32
|
+
|
|
33
|
+
public NativeEscPosPrinterDiscoverySpec(ReactApplicationContext reactContext) {
|
|
34
|
+
super(reactContext);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@Override
|
|
38
|
+
public @Nonnull String getName() {
|
|
39
|
+
return NAME;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
protected final void emitOnDiscovery(ReadableArray value) {
|
|
43
|
+
mEventEmitterCallback.invoke("onDiscovery", value);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected final void emitEnableLocationSettingSuccess() {
|
|
47
|
+
mEventEmitterCallback.invoke("enableLocationSettingSuccess");
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
protected final void emitEnableLocationSettingFailure() {
|
|
51
|
+
mEventEmitterCallback.invoke("enableLocationSettingFailure");
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
protected abstract Map<String, Object> getTypedExportedConstants();
|
|
55
|
+
|
|
56
|
+
@Override
|
|
57
|
+
@DoNotStrip
|
|
58
|
+
public final @Nullable Map<String, Object> getConstants() {
|
|
59
|
+
Map<String, Object> constants = getTypedExportedConstants();
|
|
60
|
+
if (ReactBuildConfig.DEBUG || ReactBuildConfig.IS_INTERNAL_BUILD) {
|
|
61
|
+
Set<String> obligatoryFlowConstants = new HashSet<>(Arrays.asList(
|
|
62
|
+
"BT_ERR_CANCEL",
|
|
63
|
+
"BT_ERR_ILLEGAL_DEVICE",
|
|
64
|
+
"BT_ERR_PARAM",
|
|
65
|
+
"BT_ERR_UNSUPPORTED",
|
|
66
|
+
"ERR_FAILURE",
|
|
67
|
+
"ERR_ILLEGAL",
|
|
68
|
+
"ERR_MEMORY",
|
|
69
|
+
"ERR_PARAM",
|
|
70
|
+
"ERR_PROCESSING",
|
|
71
|
+
"FILTER_NAME",
|
|
72
|
+
"FILTER_NONE",
|
|
73
|
+
"MODEL_ALL",
|
|
74
|
+
"PORTTYPE_ALL",
|
|
75
|
+
"PORTTYPE_BLUETOOTH",
|
|
76
|
+
"PORTTYPE_BLUETOOTH_LE",
|
|
77
|
+
"PORTTYPE_TCP",
|
|
78
|
+
"PORTTYPE_USB",
|
|
79
|
+
"PRINTER_FALSE",
|
|
80
|
+
"PRINTER_TRUE",
|
|
81
|
+
"TYPE_ALL",
|
|
82
|
+
"TYPE_DISPLAY",
|
|
83
|
+
"TYPE_GFE",
|
|
84
|
+
"TYPE_HYBRID_PRINTER",
|
|
85
|
+
"TYPE_KEYBOARD",
|
|
86
|
+
"TYPE_MSR",
|
|
87
|
+
"TYPE_OTHER_PERIPHERAL",
|
|
88
|
+
"TYPE_POS_KEYBOARD",
|
|
89
|
+
"TYPE_PRINTER",
|
|
90
|
+
"TYPE_SCANNER",
|
|
91
|
+
"TYPE_SERIAL"
|
|
92
|
+
));
|
|
93
|
+
Set<String> optionalFlowConstants = new HashSet<>();
|
|
94
|
+
Set<String> undeclaredConstants = new HashSet<>(constants.keySet());
|
|
95
|
+
undeclaredConstants.removeAll(obligatoryFlowConstants);
|
|
96
|
+
undeclaredConstants.removeAll(optionalFlowConstants);
|
|
97
|
+
if (!undeclaredConstants.isEmpty()) {
|
|
98
|
+
throw new IllegalStateException(String.format("Native Module Flow doesn't declare constants: %s", undeclaredConstants));
|
|
99
|
+
}
|
|
100
|
+
undeclaredConstants = obligatoryFlowConstants;
|
|
101
|
+
undeclaredConstants.removeAll(constants.keySet());
|
|
102
|
+
if (!undeclaredConstants.isEmpty()) {
|
|
103
|
+
throw new IllegalStateException(String.format("Native Module doesn't fill in constants: %s", undeclaredConstants));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return constants;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@ReactMethod
|
|
110
|
+
@DoNotStrip
|
|
111
|
+
public abstract void startDiscovery(ReadableMap filterOption, Promise promise);
|
|
112
|
+
|
|
113
|
+
@ReactMethod
|
|
114
|
+
@DoNotStrip
|
|
115
|
+
public abstract void stopDiscovery(Promise promise);
|
|
116
|
+
|
|
117
|
+
@ReactMethod
|
|
118
|
+
@DoNotStrip
|
|
119
|
+
public abstract void enableLocationSetting(Promise promise);
|
|
120
|
+
|
|
121
|
+
@ReactMethod
|
|
122
|
+
@DoNotStrip
|
|
123
|
+
public abstract void pairBluetoothDevice(String macAddress, Promise promise);
|
|
124
|
+
}
|
|
@@ -0,0 +1,363 @@
|
|
|
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: GenerateModuleJavaSpec.js
|
|
9
|
+
*
|
|
10
|
+
* @nolint
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
package com.escposprinter;
|
|
14
|
+
|
|
15
|
+
import com.facebook.proguard.annotations.DoNotStrip;
|
|
16
|
+
import com.facebook.react.bridge.Promise;
|
|
17
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
18
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
19
|
+
import com.facebook.react.bridge.ReactMethod;
|
|
20
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
21
|
+
import com.facebook.react.common.build.ReactBuildConfig;
|
|
22
|
+
import java.util.Arrays;
|
|
23
|
+
import java.util.HashSet;
|
|
24
|
+
import java.util.Map;
|
|
25
|
+
import java.util.Set;
|
|
26
|
+
import javax.annotation.Nonnull;
|
|
27
|
+
import javax.annotation.Nullable;
|
|
28
|
+
|
|
29
|
+
public abstract class NativeEscPosPrinterSpec extends ReactContextBaseJavaModule {
|
|
30
|
+
public static final String NAME = "EscPosPrinter";
|
|
31
|
+
|
|
32
|
+
public NativeEscPosPrinterSpec(ReactApplicationContext reactContext) {
|
|
33
|
+
super(reactContext);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@Override
|
|
37
|
+
public @Nonnull String getName() {
|
|
38
|
+
return NAME;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
protected abstract Map<String, Object> getTypedExportedConstants();
|
|
42
|
+
|
|
43
|
+
@Override
|
|
44
|
+
@DoNotStrip
|
|
45
|
+
public final @Nullable Map<String, Object> getConstants() {
|
|
46
|
+
Map<String, Object> constants = getTypedExportedConstants();
|
|
47
|
+
if (ReactBuildConfig.DEBUG || ReactBuildConfig.IS_INTERNAL_BUILD) {
|
|
48
|
+
Set<String> obligatoryFlowConstants = new HashSet<>(Arrays.asList(
|
|
49
|
+
"ALIGN_CENTER",
|
|
50
|
+
"ALIGN_LEFT",
|
|
51
|
+
"ALIGN_RIGHT",
|
|
52
|
+
"AUTOCUTTER_ERR",
|
|
53
|
+
"AUTORECOVER_ERR",
|
|
54
|
+
"BARCODE_CODABAR",
|
|
55
|
+
"BARCODE_CODE128",
|
|
56
|
+
"BARCODE_CODE128_AUTO",
|
|
57
|
+
"BARCODE_CODE39",
|
|
58
|
+
"BARCODE_CODE93",
|
|
59
|
+
"BARCODE_EAN13",
|
|
60
|
+
"BARCODE_EAN8",
|
|
61
|
+
"BARCODE_GS1_128",
|
|
62
|
+
"BARCODE_GS1_DATABAR_EXPANDED",
|
|
63
|
+
"BARCODE_GS1_DATABAR_LIMITED",
|
|
64
|
+
"BARCODE_GS1_DATABAR_OMNIDIRECTIONAL",
|
|
65
|
+
"BARCODE_GS1_DATABAR_TRUNCATED",
|
|
66
|
+
"BARCODE_ITF",
|
|
67
|
+
"BARCODE_JAN13",
|
|
68
|
+
"BARCODE_JAN8",
|
|
69
|
+
"BARCODE_UPC_A",
|
|
70
|
+
"BARCODE_UPC_E",
|
|
71
|
+
"BATTERY_OVERHEAT",
|
|
72
|
+
"CODE_ERR_AUTORECOVER",
|
|
73
|
+
"CODE_ERR_BATTERY_LOW",
|
|
74
|
+
"CODE_ERR_COVER_OPEN",
|
|
75
|
+
"CODE_ERR_CUTTER",
|
|
76
|
+
"CODE_ERR_DEVICE_BUSY",
|
|
77
|
+
"CODE_ERR_EMPTY",
|
|
78
|
+
"CODE_ERR_FAILURE",
|
|
79
|
+
"CODE_ERR_ILLEGAL",
|
|
80
|
+
"CODE_ERR_JOB_NOT_FOUND",
|
|
81
|
+
"CODE_ERR_MECHANICAL",
|
|
82
|
+
"CODE_ERR_MEMORY",
|
|
83
|
+
"CODE_ERR_NOT_FOUND",
|
|
84
|
+
"CODE_ERR_PARAM",
|
|
85
|
+
"CODE_ERR_PORT",
|
|
86
|
+
"CODE_ERR_PROCESSING",
|
|
87
|
+
"CODE_ERR_REQUEST_ENTITY_TOO_LARGE",
|
|
88
|
+
"CODE_ERR_SPOOLER",
|
|
89
|
+
"CODE_ERR_SYSTEM",
|
|
90
|
+
"CODE_ERR_TIMEOUT",
|
|
91
|
+
"CODE_ERR_TOO_MANY_REQUESTS",
|
|
92
|
+
"CODE_ERR_UNRECOVERABLE",
|
|
93
|
+
"CODE_ERR_WAIT_REMOVAL",
|
|
94
|
+
"CODE_PRINTING",
|
|
95
|
+
"COLOR_1",
|
|
96
|
+
"COLOR_2",
|
|
97
|
+
"COLOR_3",
|
|
98
|
+
"COLOR_4",
|
|
99
|
+
"COLOR_NONE",
|
|
100
|
+
"COMPRESS_AUTO",
|
|
101
|
+
"COMPRESS_DEFLATE",
|
|
102
|
+
"COMPRESS_NONE",
|
|
103
|
+
"COVER_OPEN",
|
|
104
|
+
"CUT_FEED",
|
|
105
|
+
"CUT_NO_FEED",
|
|
106
|
+
"CUT_RESERVE",
|
|
107
|
+
"DRAWER_2PIN",
|
|
108
|
+
"DRAWER_5PIN",
|
|
109
|
+
"DRAWER_HIGH",
|
|
110
|
+
"DRAWER_LOW",
|
|
111
|
+
"EPOS2_BATTERY_LEVEL_0",
|
|
112
|
+
"EPOS2_BATTERY_LEVEL_1",
|
|
113
|
+
"EPOS2_BATTERY_LEVEL_2",
|
|
114
|
+
"EPOS2_BATTERY_LEVEL_3",
|
|
115
|
+
"EPOS2_BATTERY_LEVEL_4",
|
|
116
|
+
"EPOS2_BATTERY_LEVEL_5",
|
|
117
|
+
"EPOS2_BATTERY_LEVEL_6",
|
|
118
|
+
"ERR_CONNECT",
|
|
119
|
+
"ERR_DISCONNECT",
|
|
120
|
+
"ERR_FAILURE",
|
|
121
|
+
"ERR_ILLEGAL",
|
|
122
|
+
"ERR_INIT",
|
|
123
|
+
"ERR_IN_USE",
|
|
124
|
+
"ERR_MEMORY",
|
|
125
|
+
"ERR_NOT_FOUND",
|
|
126
|
+
"ERR_PARAM",
|
|
127
|
+
"ERR_PROCESSING",
|
|
128
|
+
"ERR_RECOVERY_FAILURE",
|
|
129
|
+
"ERR_TIMEOUT",
|
|
130
|
+
"ERR_TYPE_INVALID",
|
|
131
|
+
"ERR_UNSUPPORTED",
|
|
132
|
+
"FONT_A",
|
|
133
|
+
"FONT_B",
|
|
134
|
+
"FONT_C",
|
|
135
|
+
"FONT_D",
|
|
136
|
+
"FONT_E",
|
|
137
|
+
"FULL_CUT_FEED",
|
|
138
|
+
"FULL_CUT_NO_FEED",
|
|
139
|
+
"FULL_CUT_RESERVE",
|
|
140
|
+
"HALFTONE_DITHER",
|
|
141
|
+
"HALFTONE_ERROR_DIFFUSION",
|
|
142
|
+
"HALFTONE_THRESHOLD",
|
|
143
|
+
"HEAD_OVERHEAT",
|
|
144
|
+
"HIGH_VOLTAGE_ERR",
|
|
145
|
+
"HRI_ABOVE",
|
|
146
|
+
"HRI_BELOW",
|
|
147
|
+
"HRI_BOTH",
|
|
148
|
+
"HRI_NONE",
|
|
149
|
+
"LANG_EN",
|
|
150
|
+
"LANG_JA",
|
|
151
|
+
"LANG_KO",
|
|
152
|
+
"LANG_MULTI",
|
|
153
|
+
"LANG_TH",
|
|
154
|
+
"LANG_VI",
|
|
155
|
+
"LANG_ZH_CN",
|
|
156
|
+
"LANG_ZH_TW",
|
|
157
|
+
"LEVEL_0",
|
|
158
|
+
"LEVEL_1",
|
|
159
|
+
"LEVEL_2",
|
|
160
|
+
"LEVEL_3",
|
|
161
|
+
"LEVEL_4",
|
|
162
|
+
"LEVEL_5",
|
|
163
|
+
"LEVEL_6",
|
|
164
|
+
"LEVEL_7",
|
|
165
|
+
"LEVEL_8",
|
|
166
|
+
"LEVEL_H",
|
|
167
|
+
"LEVEL_L",
|
|
168
|
+
"LEVEL_M",
|
|
169
|
+
"LEVEL_Q",
|
|
170
|
+
"LOW_VOLTAGE_ERR",
|
|
171
|
+
"MECHANICAL_ERR",
|
|
172
|
+
"MODEL_ANK",
|
|
173
|
+
"MODEL_CHINESE",
|
|
174
|
+
"MODEL_KOREAN",
|
|
175
|
+
"MODEL_SOUTHASIA",
|
|
176
|
+
"MODEL_TAIWAN",
|
|
177
|
+
"MODEL_THAI",
|
|
178
|
+
"MODE_GRAY16",
|
|
179
|
+
"MODE_MONO",
|
|
180
|
+
"MODE_MONO_HIGH_DENSITY",
|
|
181
|
+
"MOTOR_OVERHEAT",
|
|
182
|
+
"NO_ERR",
|
|
183
|
+
"PAPER_EMPTY",
|
|
184
|
+
"PAPER_NEAR_END",
|
|
185
|
+
"PAPER_OK",
|
|
186
|
+
"PARAM_DEFAULT",
|
|
187
|
+
"PARAM_UNSPECIFIED",
|
|
188
|
+
"PRINTER_FALSE",
|
|
189
|
+
"PRINTER_SETTING_PAPERWIDTH",
|
|
190
|
+
"PRINTER_SETTING_PAPERWIDTH58_0",
|
|
191
|
+
"PRINTER_SETTING_PAPERWIDTH60_0",
|
|
192
|
+
"PRINTER_SETTING_PAPERWIDTH70_0",
|
|
193
|
+
"PRINTER_SETTING_PAPERWIDTH76_0",
|
|
194
|
+
"PRINTER_SETTING_PAPERWIDTH80_0",
|
|
195
|
+
"PRINTER_SETTING_PRINTDENSITY",
|
|
196
|
+
"PRINTER_SETTING_PRINTDENSITY100",
|
|
197
|
+
"PRINTER_SETTING_PRINTDENSITY105",
|
|
198
|
+
"PRINTER_SETTING_PRINTDENSITY110",
|
|
199
|
+
"PRINTER_SETTING_PRINTDENSITY115",
|
|
200
|
+
"PRINTER_SETTING_PRINTDENSITY120",
|
|
201
|
+
"PRINTER_SETTING_PRINTDENSITY125",
|
|
202
|
+
"PRINTER_SETTING_PRINTDENSITY130",
|
|
203
|
+
"PRINTER_SETTING_PRINTDENSITY70",
|
|
204
|
+
"PRINTER_SETTING_PRINTDENSITY75",
|
|
205
|
+
"PRINTER_SETTING_PRINTDENSITY80",
|
|
206
|
+
"PRINTER_SETTING_PRINTDENSITY85",
|
|
207
|
+
"PRINTER_SETTING_PRINTDENSITY90",
|
|
208
|
+
"PRINTER_SETTING_PRINTDENSITY95",
|
|
209
|
+
"PRINTER_SETTING_PRINTDENSITYDIP",
|
|
210
|
+
"PRINTER_SETTING_PRINTSPEED",
|
|
211
|
+
"PRINTER_SETTING_PRINTSPEED1",
|
|
212
|
+
"PRINTER_SETTING_PRINTSPEED10",
|
|
213
|
+
"PRINTER_SETTING_PRINTSPEED11",
|
|
214
|
+
"PRINTER_SETTING_PRINTSPEED12",
|
|
215
|
+
"PRINTER_SETTING_PRINTSPEED13",
|
|
216
|
+
"PRINTER_SETTING_PRINTSPEED14",
|
|
217
|
+
"PRINTER_SETTING_PRINTSPEED15",
|
|
218
|
+
"PRINTER_SETTING_PRINTSPEED16",
|
|
219
|
+
"PRINTER_SETTING_PRINTSPEED17",
|
|
220
|
+
"PRINTER_SETTING_PRINTSPEED2",
|
|
221
|
+
"PRINTER_SETTING_PRINTSPEED3",
|
|
222
|
+
"PRINTER_SETTING_PRINTSPEED4",
|
|
223
|
+
"PRINTER_SETTING_PRINTSPEED5",
|
|
224
|
+
"PRINTER_SETTING_PRINTSPEED6",
|
|
225
|
+
"PRINTER_SETTING_PRINTSPEED7",
|
|
226
|
+
"PRINTER_SETTING_PRINTSPEED8",
|
|
227
|
+
"PRINTER_SETTING_PRINTSPEED9",
|
|
228
|
+
"PRINTER_TRUE",
|
|
229
|
+
"PULSE_100",
|
|
230
|
+
"PULSE_200",
|
|
231
|
+
"PULSE_300",
|
|
232
|
+
"PULSE_400",
|
|
233
|
+
"PULSE_500",
|
|
234
|
+
"REMOVAL_DETECT_PAPER",
|
|
235
|
+
"REMOVAL_DETECT_PAPER_NONE",
|
|
236
|
+
"REMOVAL_DETECT_UNKNOWN",
|
|
237
|
+
"REMOVAL_WAIT_NONE",
|
|
238
|
+
"REMOVAL_WAIT_PAPER",
|
|
239
|
+
"SWITCH_OFF",
|
|
240
|
+
"SWITCH_ON",
|
|
241
|
+
"SYMBOL_AZTECCODE_COMPACT",
|
|
242
|
+
"SYMBOL_AZTECCODE_FULLRANGE",
|
|
243
|
+
"SYMBOL_DATAMATRIX_RECTANGLE_12",
|
|
244
|
+
"SYMBOL_DATAMATRIX_RECTANGLE_16",
|
|
245
|
+
"SYMBOL_DATAMATRIX_RECTANGLE_8",
|
|
246
|
+
"SYMBOL_DATAMATRIX_SQUARE",
|
|
247
|
+
"SYMBOL_GS1_DATABAR_EXPANDED_STACKED",
|
|
248
|
+
"SYMBOL_GS1_DATABAR_STACKED",
|
|
249
|
+
"SYMBOL_GS1_DATABAR_STACKED_OMNIDIRECTIONAL",
|
|
250
|
+
"SYMBOL_MAXICODE_MODE_2",
|
|
251
|
+
"SYMBOL_MAXICODE_MODE_3",
|
|
252
|
+
"SYMBOL_MAXICODE_MODE_4",
|
|
253
|
+
"SYMBOL_MAXICODE_MODE_5",
|
|
254
|
+
"SYMBOL_MAXICODE_MODE_6",
|
|
255
|
+
"SYMBOL_PDF417_STANDARD",
|
|
256
|
+
"SYMBOL_PDF417_TRUNCATED",
|
|
257
|
+
"SYMBOL_QRCODE_MICRO",
|
|
258
|
+
"SYMBOL_QRCODE_MODEL_1",
|
|
259
|
+
"SYMBOL_QRCODE_MODEL_2",
|
|
260
|
+
"UNKNOWN",
|
|
261
|
+
"UNRECOVER_ERR",
|
|
262
|
+
"WRONG_PAPER"
|
|
263
|
+
));
|
|
264
|
+
Set<String> optionalFlowConstants = new HashSet<>();
|
|
265
|
+
Set<String> undeclaredConstants = new HashSet<>(constants.keySet());
|
|
266
|
+
undeclaredConstants.removeAll(obligatoryFlowConstants);
|
|
267
|
+
undeclaredConstants.removeAll(optionalFlowConstants);
|
|
268
|
+
if (!undeclaredConstants.isEmpty()) {
|
|
269
|
+
throw new IllegalStateException(String.format("Native Module Flow doesn't declare constants: %s", undeclaredConstants));
|
|
270
|
+
}
|
|
271
|
+
undeclaredConstants = obligatoryFlowConstants;
|
|
272
|
+
undeclaredConstants.removeAll(constants.keySet());
|
|
273
|
+
if (!undeclaredConstants.isEmpty()) {
|
|
274
|
+
throw new IllegalStateException(String.format("Native Module doesn't fill in constants: %s", undeclaredConstants));
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return constants;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@ReactMethod
|
|
281
|
+
@DoNotStrip
|
|
282
|
+
public abstract void initWithPrinterDeviceName(String target, String deviceName, double lang, Promise promise);
|
|
283
|
+
|
|
284
|
+
@ReactMethod
|
|
285
|
+
@DoNotStrip
|
|
286
|
+
public abstract void connect(String target, double timeout, Promise promise);
|
|
287
|
+
|
|
288
|
+
@ReactMethod
|
|
289
|
+
@DoNotStrip
|
|
290
|
+
public abstract void disconnect(String target, Promise promise);
|
|
291
|
+
|
|
292
|
+
@ReactMethod
|
|
293
|
+
@DoNotStrip
|
|
294
|
+
public abstract void clearCommandBuffer(String target, Promise promise);
|
|
295
|
+
|
|
296
|
+
@ReactMethod
|
|
297
|
+
@DoNotStrip
|
|
298
|
+
public abstract void addText(String target, String data, Promise promise);
|
|
299
|
+
|
|
300
|
+
@ReactMethod
|
|
301
|
+
@DoNotStrip
|
|
302
|
+
public abstract void addTextLang(String target, double lang, Promise promise);
|
|
303
|
+
|
|
304
|
+
@ReactMethod
|
|
305
|
+
@DoNotStrip
|
|
306
|
+
public abstract void addFeedLine(String target, double line, Promise promise);
|
|
307
|
+
|
|
308
|
+
@ReactMethod
|
|
309
|
+
@DoNotStrip
|
|
310
|
+
public abstract void addLineSpace(String target, double linespc, Promise promise);
|
|
311
|
+
|
|
312
|
+
@ReactMethod
|
|
313
|
+
@DoNotStrip
|
|
314
|
+
public abstract void addCut(String target, double type, Promise promise);
|
|
315
|
+
|
|
316
|
+
@ReactMethod
|
|
317
|
+
@DoNotStrip
|
|
318
|
+
public abstract void sendData(String target, double timeout, Promise promise);
|
|
319
|
+
|
|
320
|
+
@ReactMethod
|
|
321
|
+
@DoNotStrip
|
|
322
|
+
public abstract void getPrinterSetting(String target, double timeout, double type, Promise promise);
|
|
323
|
+
|
|
324
|
+
@ReactMethod
|
|
325
|
+
@DoNotStrip
|
|
326
|
+
public abstract void getStatus(String target, Promise promise);
|
|
327
|
+
|
|
328
|
+
@ReactMethod
|
|
329
|
+
@DoNotStrip
|
|
330
|
+
public abstract void addImage(String target, ReadableMap source, double width, double color, double mode, double halftone, double brightness, double compress, Promise promise);
|
|
331
|
+
|
|
332
|
+
@ReactMethod
|
|
333
|
+
@DoNotStrip
|
|
334
|
+
public abstract void addBarcode(String target, String data, double type, double hri, double font, double width, double height, Promise promise);
|
|
335
|
+
|
|
336
|
+
@ReactMethod
|
|
337
|
+
@DoNotStrip
|
|
338
|
+
public abstract void addSymbol(String target, String data, double type, double level, double width, double height, double size, Promise promise);
|
|
339
|
+
|
|
340
|
+
@ReactMethod
|
|
341
|
+
@DoNotStrip
|
|
342
|
+
public abstract void addCommand(String target, String data, Promise promise);
|
|
343
|
+
|
|
344
|
+
@ReactMethod
|
|
345
|
+
@DoNotStrip
|
|
346
|
+
public abstract void addPulse(String target, double drawer, double time, Promise promise);
|
|
347
|
+
|
|
348
|
+
@ReactMethod
|
|
349
|
+
@DoNotStrip
|
|
350
|
+
public abstract void addTextAlign(String target, double align, Promise promise);
|
|
351
|
+
|
|
352
|
+
@ReactMethod
|
|
353
|
+
@DoNotStrip
|
|
354
|
+
public abstract void addTextSize(String target, double width, double height, Promise promise);
|
|
355
|
+
|
|
356
|
+
@ReactMethod
|
|
357
|
+
@DoNotStrip
|
|
358
|
+
public abstract void addTextSmooth(String target, double smooth, Promise promise);
|
|
359
|
+
|
|
360
|
+
@ReactMethod
|
|
361
|
+
@DoNotStrip
|
|
362
|
+
public abstract void addTextStyle(String target, double reverse, double ul, double em, double color, Promise promise);
|
|
363
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import "ePOS2.h"
|
|
3
|
+
|
|
4
|
+
@interface EposStringHelper : NSObject
|
|
5
|
+
|
|
6
|
+
+ (NSDictionary *)convertStatusInfoToDictionary:(Epos2PrinterStatusInfo *)status;
|
|
7
|
+
+ (NSDictionary *)getDiscoveryConstants;
|
|
8
|
+
+ (NSDictionary *)getPrinterConstants;
|
|
9
|
+
+ (NSString *)convertDictionatyToJsonString:(NSDictionary *)dict;
|
|
10
|
+
+ (int)getPrinterSeries:(NSString*)name;
|
|
11
|
+
+ (int)getInitErrorResultCode;
|
|
12
|
+
|
|
13
|
+
@end
|