@onekeyfe/react-native-qr-scanner 6.8.0-alpha.545 → 6.8.0-alpha.546
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/android/src/main/java/com/margelo/nitro/qrscanner/HybridQrCameraList.kt +100 -0
- package/android/src/main/java/com/margelo/nitro/qrscanner/QrCameraCatalog.kt +26 -0
- package/android/src/main/java/com/margelo/nitro/qrscanner/QrScanner.kt +42 -8
- package/android/src/test/java/com/margelo/nitro/qrscanner/QrCameraCatalogTest.kt +37 -0
- package/ios/HybridQrCameraList.swift +54 -0
- package/ios/QrCameraControl.swift +42 -0
- package/ios/QrScanner.swift +82 -23
- package/lib/module/QrCameraList.nitro.js +4 -0
- package/lib/module/QrCameraList.nitro.js.map +1 -0
- package/lib/module/QrScanner.js +2 -0
- package/lib/module/QrScanner.js.map +1 -1
- package/lib/module/cameras.js +33 -0
- package/lib/module/cameras.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/web/cameras.js +33 -0
- package/lib/module/web/cameras.js.map +1 -0
- package/lib/module/web/index.js +1 -0
- package/lib/module/web/index.js.map +1 -1
- package/lib/module/web/scanner.js +22 -5
- package/lib/module/web/scanner.js.map +1 -1
- package/lib/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/lib/nitrogen/generated/android/c++/JHybridQrCameraListSpec.cpp +91 -0
- package/lib/nitrogen/generated/android/c++/JHybridQrCameraListSpec.hpp +64 -0
- package/lib/nitrogen/generated/android/c++/JHybridQrScannerSpec.cpp +11 -2
- package/lib/nitrogen/generated/android/c++/JHybridQrScannerSpec.hpp +2 -0
- package/lib/nitrogen/generated/android/c++/JQrCameraInfo.hpp +67 -0
- package/lib/nitrogen/generated/android/c++/JQrCameraPosition.hpp +61 -0
- package/lib/nitrogen/generated/android/c++/views/JHybridQrScannerStateUpdater.cpp +5 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/qrscanner/Func_void.kt +78 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/qrscanner/HybridQrCameraListSpec.kt +66 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/qrscanner/HybridQrScannerSpec.kt +6 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/qrscanner/QrCameraInfo.kt +61 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/qrscanner/QrCameraPosition.kt +24 -0
- package/lib/nitrogen/generated/android/qrscanner+autolinking.cmake +2 -0
- package/lib/nitrogen/generated/android/qrscannerOnLoad.cpp +18 -0
- package/lib/nitrogen/generated/ios/QrScanner-Swift-Cxx-Bridge.cpp +37 -4
- package/lib/nitrogen/generated/ios/QrScanner-Swift-Cxx-Bridge.hpp +146 -22
- package/lib/nitrogen/generated/ios/QrScanner-Swift-Cxx-Umbrella.hpp +12 -0
- package/lib/nitrogen/generated/ios/QrScannerAutolinking.mm +8 -0
- package/lib/nitrogen/generated/ios/QrScannerAutolinking.swift +12 -0
- package/lib/nitrogen/generated/ios/c++/HybridQrCameraListSpecSwift.cpp +11 -0
- package/lib/nitrogen/generated/ios/c++/HybridQrCameraListSpecSwift.hpp +97 -0
- package/lib/nitrogen/generated/ios/c++/HybridQrScannerSpecSwift.hpp +9 -2
- package/lib/nitrogen/generated/ios/c++/views/HybridQrScannerComponent.mm +6 -0
- package/lib/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/lib/nitrogen/generated/ios/swift/Func_void_std__vector_QrCameraInfo_.swift +46 -0
- package/lib/nitrogen/generated/ios/swift/HybridQrCameraListSpec.swift +56 -0
- package/lib/nitrogen/generated/ios/swift/HybridQrCameraListSpec_cxx.swift +174 -0
- package/lib/nitrogen/generated/ios/swift/HybridQrScannerSpec.swift +1 -0
- package/lib/nitrogen/generated/ios/swift/HybridQrScannerSpec_cxx.swift +24 -0
- package/lib/nitrogen/generated/ios/swift/QrCameraInfo.swift +39 -0
- package/lib/nitrogen/generated/ios/swift/QrCameraPosition.swift +44 -0
- package/lib/nitrogen/generated/shared/c++/HybridQrCameraListSpec.cpp +22 -0
- package/lib/nitrogen/generated/shared/c++/HybridQrCameraListSpec.hpp +68 -0
- package/lib/nitrogen/generated/shared/c++/HybridQrScannerSpec.cpp +2 -0
- package/lib/nitrogen/generated/shared/c++/HybridQrScannerSpec.hpp +4 -2
- package/lib/nitrogen/generated/shared/c++/QrCameraInfo.hpp +93 -0
- package/lib/nitrogen/generated/shared/c++/QrCameraPosition.hpp +80 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridQrScannerComponent.cpp +2 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridQrScannerComponent.hpp +5 -2
- package/lib/nitrogen/generated/shared/json/QrScannerConfig.json +1 -0
- package/lib/typescript/src/QrCameraList.nitro.d.ts +24 -0
- package/lib/typescript/src/QrCameraList.nitro.d.ts.map +1 -0
- package/lib/typescript/src/QrScanner.d.ts +6 -1
- package/lib/typescript/src/QrScanner.d.ts.map +1 -1
- package/lib/typescript/src/QrScanner.nitro.d.ts +6 -0
- package/lib/typescript/src/QrScanner.nitro.d.ts.map +1 -1
- package/lib/typescript/src/cameras.d.ts +11 -0
- package/lib/typescript/src/cameras.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/web/cameras.d.ts +12 -0
- package/lib/typescript/src/web/cameras.d.ts.map +1 -0
- package/lib/typescript/src/web/index.d.ts +2 -0
- package/lib/typescript/src/web/index.d.ts.map +1 -1
- package/lib/typescript/src/web/scanner.d.ts +7 -0
- package/lib/typescript/src/web/scanner.d.ts.map +1 -1
- package/nitro.json +4 -0
- package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/nitrogen/generated/android/c++/JHybridQrCameraListSpec.cpp +91 -0
- package/nitrogen/generated/android/c++/JHybridQrCameraListSpec.hpp +64 -0
- package/nitrogen/generated/android/c++/JHybridQrScannerSpec.cpp +11 -2
- package/nitrogen/generated/android/c++/JHybridQrScannerSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/JQrCameraInfo.hpp +67 -0
- package/nitrogen/generated/android/c++/JQrCameraPosition.hpp +61 -0
- package/nitrogen/generated/android/c++/views/JHybridQrScannerStateUpdater.cpp +5 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/qrscanner/Func_void.kt +78 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/qrscanner/HybridQrCameraListSpec.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/qrscanner/HybridQrScannerSpec.kt +6 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/qrscanner/QrCameraInfo.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/qrscanner/QrCameraPosition.kt +24 -0
- package/nitrogen/generated/android/qrscanner+autolinking.cmake +2 -0
- package/nitrogen/generated/android/qrscannerOnLoad.cpp +18 -0
- package/nitrogen/generated/ios/QrScanner-Swift-Cxx-Bridge.cpp +37 -4
- package/nitrogen/generated/ios/QrScanner-Swift-Cxx-Bridge.hpp +146 -22
- package/nitrogen/generated/ios/QrScanner-Swift-Cxx-Umbrella.hpp +12 -0
- package/nitrogen/generated/ios/QrScannerAutolinking.mm +8 -0
- package/nitrogen/generated/ios/QrScannerAutolinking.swift +12 -0
- package/nitrogen/generated/ios/c++/HybridQrCameraListSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridQrCameraListSpecSwift.hpp +97 -0
- package/nitrogen/generated/ios/c++/HybridQrScannerSpecSwift.hpp +9 -2
- package/nitrogen/generated/ios/c++/views/HybridQrScannerComponent.mm +6 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_QrCameraInfo_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridQrCameraListSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridQrCameraListSpec_cxx.swift +174 -0
- package/nitrogen/generated/ios/swift/HybridQrScannerSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridQrScannerSpec_cxx.swift +24 -0
- package/nitrogen/generated/ios/swift/QrCameraInfo.swift +39 -0
- package/nitrogen/generated/ios/swift/QrCameraPosition.swift +44 -0
- package/nitrogen/generated/shared/c++/HybridQrCameraListSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridQrCameraListSpec.hpp +68 -0
- package/nitrogen/generated/shared/c++/HybridQrScannerSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridQrScannerSpec.hpp +4 -2
- package/nitrogen/generated/shared/c++/QrCameraInfo.hpp +93 -0
- package/nitrogen/generated/shared/c++/QrCameraPosition.hpp +80 -0
- package/nitrogen/generated/shared/c++/views/HybridQrScannerComponent.cpp +2 -0
- package/nitrogen/generated/shared/c++/views/HybridQrScannerComponent.hpp +5 -2
- package/nitrogen/generated/shared/json/QrScannerConfig.json +1 -0
- package/package.json +1 -1
- package/src/QrCameraList.nitro.ts +24 -0
- package/src/QrScanner.nitro.ts +6 -0
- package/src/QrScanner.tsx +9 -1
- package/src/cameras.ts +36 -0
- package/src/index.tsx +2 -0
- package/src/web/cameras.ts +36 -0
- package/src/web/index.ts +6 -0
- package/src/web/scanner.ts +28 -4
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridQrCameraListSpecSwift.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "HybridQrCameraListSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridQrCameraListSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace QrScanner { class HybridQrCameraListSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
// Forward declaration of `QrCameraInfo` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::qrscanner { struct QrCameraInfo; }
|
|
17
|
+
// Forward declaration of `QrCameraPosition` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::qrscanner { enum class QrCameraPosition; }
|
|
19
|
+
|
|
20
|
+
#include "QrCameraInfo.hpp"
|
|
21
|
+
#include <vector>
|
|
22
|
+
#include <NitroModules/Promise.hpp>
|
|
23
|
+
#include <string>
|
|
24
|
+
#include "QrCameraPosition.hpp"
|
|
25
|
+
#include <functional>
|
|
26
|
+
#include <optional>
|
|
27
|
+
|
|
28
|
+
#include "QrScanner-Swift-Cxx-Umbrella.hpp"
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::qrscanner {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The C++ part of HybridQrCameraListSpec_cxx.swift.
|
|
34
|
+
*
|
|
35
|
+
* HybridQrCameraListSpecSwift (C++) accesses HybridQrCameraListSpec_cxx (Swift), and might
|
|
36
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
37
|
+
*
|
|
38
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
39
|
+
* the future, HybridQrCameraListSpec_cxx can directly inherit from the C++ class HybridQrCameraListSpec
|
|
40
|
+
* to simplify the whole structure and memory management.
|
|
41
|
+
*/
|
|
42
|
+
class HybridQrCameraListSpecSwift: public virtual HybridQrCameraListSpec {
|
|
43
|
+
public:
|
|
44
|
+
// Constructor from a Swift instance
|
|
45
|
+
explicit HybridQrCameraListSpecSwift(const QrScanner::HybridQrCameraListSpec_cxx& swiftPart):
|
|
46
|
+
HybridObject(HybridQrCameraListSpec::TAG),
|
|
47
|
+
_swiftPart(swiftPart) { }
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
// Get the Swift part
|
|
51
|
+
inline QrScanner::HybridQrCameraListSpec_cxx& getSwiftPart() noexcept {
|
|
52
|
+
return _swiftPart;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
57
|
+
return _swiftPart.getMemorySize();
|
|
58
|
+
}
|
|
59
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
60
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridQrCameraListSpecSwift>(other)) {
|
|
61
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
void dispose() noexcept override {
|
|
66
|
+
_swiftPart.dispose();
|
|
67
|
+
}
|
|
68
|
+
std::string toString() override {
|
|
69
|
+
return _swiftPart.toString();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
public:
|
|
73
|
+
// Properties
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
public:
|
|
77
|
+
// Methods
|
|
78
|
+
inline std::shared_ptr<Promise<std::vector<QrCameraInfo>>> listCameras() override {
|
|
79
|
+
auto __result = _swiftPart.listCameras();
|
|
80
|
+
if (__result.hasError()) [[unlikely]] {
|
|
81
|
+
std::rethrow_exception(__result.error());
|
|
82
|
+
}
|
|
83
|
+
auto __value = std::move(__result.value());
|
|
84
|
+
return __value;
|
|
85
|
+
}
|
|
86
|
+
inline void setOnChange(const std::optional<std::function<void()>>& listener) override {
|
|
87
|
+
auto __result = _swiftPart.setOnChange(listener);
|
|
88
|
+
if (__result.hasError()) [[unlikely]] {
|
|
89
|
+
std::rethrow_exception(__result.error());
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
private:
|
|
94
|
+
QrScanner::HybridQrCameraListSpec_cxx _swiftPart;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
} // namespace margelo::nitro::qrscanner
|
|
@@ -14,9 +14,9 @@ namespace QrScanner { class HybridQrScannerSpec_cxx; }
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
#include <functional>
|
|
18
|
-
#include <optional>
|
|
19
17
|
#include <string>
|
|
18
|
+
#include <optional>
|
|
19
|
+
#include <functional>
|
|
20
20
|
|
|
21
21
|
#include "QrScanner-Swift-Cxx-Umbrella.hpp"
|
|
22
22
|
|
|
@@ -70,6 +70,13 @@ namespace margelo::nitro::qrscanner {
|
|
|
70
70
|
inline void setActive(bool active) noexcept override {
|
|
71
71
|
_swiftPart.setActive(std::forward<decltype(active)>(active));
|
|
72
72
|
}
|
|
73
|
+
inline std::optional<std::string> getCameraId() noexcept override {
|
|
74
|
+
auto __result = _swiftPart.getCameraId();
|
|
75
|
+
return __result;
|
|
76
|
+
}
|
|
77
|
+
inline void setCameraId(const std::optional<std::string>& cameraId) noexcept override {
|
|
78
|
+
_swiftPart.setCameraId(cameraId);
|
|
79
|
+
}
|
|
73
80
|
inline std::optional<std::function<void(double /* generation */)>> getOnReady() noexcept override {
|
|
74
81
|
auto __result = _swiftPart.getOnReady();
|
|
75
82
|
return __result;
|
|
@@ -104,6 +104,12 @@ using namespace margelo::nitro::qrscanner::views;
|
|
|
104
104
|
: !newViewProps.active.hasSameValue(oldViewProps->active)) {
|
|
105
105
|
swiftPart.setActive(newViewProps.active.get());
|
|
106
106
|
}
|
|
107
|
+
// cameraId: optional
|
|
108
|
+
if (oldViewProps == nullptr
|
|
109
|
+
? newViewProps.cameraId.isProvided()
|
|
110
|
+
: !newViewProps.cameraId.hasSameValue(oldViewProps->cameraId)) {
|
|
111
|
+
swiftPart.setCameraId(newViewProps.cameraId.get());
|
|
112
|
+
}
|
|
107
113
|
// onReady: optional
|
|
108
114
|
if (oldViewProps == nullptr
|
|
109
115
|
? newViewProps.onReady.isProvided()
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Wraps a Swift `() -> Void` as a class.
|
|
12
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
13
|
+
*/
|
|
14
|
+
public final class Func_void {
|
|
15
|
+
public typealias bridge = margelo.nitro.qrscanner.bridge.swift
|
|
16
|
+
|
|
17
|
+
private let closure: () -> Void
|
|
18
|
+
|
|
19
|
+
public init(_ closure: @escaping () -> Void) {
|
|
20
|
+
self.closure = closure
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@inline(__always)
|
|
24
|
+
public func call() -> Void {
|
|
25
|
+
self.closure()
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
30
|
+
* This acquires one additional strong reference on the object!
|
|
31
|
+
*/
|
|
32
|
+
@inline(__always)
|
|
33
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
34
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Casts an unsafe pointer to a `Func_void`.
|
|
39
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void>`.
|
|
40
|
+
* This removes one strong reference from the object!
|
|
41
|
+
*/
|
|
42
|
+
@inline(__always)
|
|
43
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void {
|
|
44
|
+
return Unmanaged<Func_void>.fromOpaque(pointer).takeRetainedValue()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__vector_QrCameraInfo_.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Wraps a Swift `(_ value: [QrCameraInfo]) -> Void` as a class.
|
|
12
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
13
|
+
*/
|
|
14
|
+
public final class Func_void_std__vector_QrCameraInfo_ {
|
|
15
|
+
public typealias bridge = margelo.nitro.qrscanner.bridge.swift
|
|
16
|
+
|
|
17
|
+
private let closure: (_ value: [QrCameraInfo]) -> Void
|
|
18
|
+
|
|
19
|
+
public init(_ closure: @escaping (_ value: [QrCameraInfo]) -> Void) {
|
|
20
|
+
self.closure = closure
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@inline(__always)
|
|
24
|
+
public func call(value: bridge.std__vector_QrCameraInfo_) -> Void {
|
|
25
|
+
self.closure(value.map({ __item in __item }))
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
30
|
+
* This acquires one additional strong reference on the object!
|
|
31
|
+
*/
|
|
32
|
+
@inline(__always)
|
|
33
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
34
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Casts an unsafe pointer to a `Func_void_std__vector_QrCameraInfo_`.
|
|
39
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__vector_QrCameraInfo_>`.
|
|
40
|
+
* This removes one strong reference from the object!
|
|
41
|
+
*/
|
|
42
|
+
@inline(__always)
|
|
43
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__vector_QrCameraInfo_ {
|
|
44
|
+
return Unmanaged<Func_void_std__vector_QrCameraInfo_>.fromOpaque(pointer).takeRetainedValue()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridQrCameraListSpec.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/// See ``HybridQrCameraListSpec``
|
|
11
|
+
public protocol HybridQrCameraListSpec_protocol: HybridObject {
|
|
12
|
+
// Properties
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
// Methods
|
|
16
|
+
func listCameras() throws -> Promise<[QrCameraInfo]>
|
|
17
|
+
func setOnChange(listener: (() -> Void)?) throws -> Void
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public extension HybridQrCameraListSpec_protocol {
|
|
21
|
+
/// Default implementation of ``HybridObject.toString``
|
|
22
|
+
func toString() -> String {
|
|
23
|
+
return "[HybridObject QrCameraList]"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/// See ``HybridQrCameraListSpec``
|
|
28
|
+
open class HybridQrCameraListSpec_base {
|
|
29
|
+
private weak var cxxWrapper: HybridQrCameraListSpec_cxx? = nil
|
|
30
|
+
public init() { }
|
|
31
|
+
public func getCxxWrapper() -> HybridQrCameraListSpec_cxx {
|
|
32
|
+
#if DEBUG
|
|
33
|
+
guard self is any HybridQrCameraListSpec else {
|
|
34
|
+
fatalError("`self` is not a `HybridQrCameraListSpec`! Did you accidentally inherit from `HybridQrCameraListSpec_base` instead of `HybridQrCameraListSpec`?")
|
|
35
|
+
}
|
|
36
|
+
#endif
|
|
37
|
+
if let cxxWrapper = self.cxxWrapper {
|
|
38
|
+
return cxxWrapper
|
|
39
|
+
} else {
|
|
40
|
+
let cxxWrapper = HybridQrCameraListSpec_cxx(self as! any HybridQrCameraListSpec)
|
|
41
|
+
self.cxxWrapper = cxxWrapper
|
|
42
|
+
return cxxWrapper
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* A Swift base-protocol representing the QrCameraList HybridObject.
|
|
49
|
+
* Implement this protocol to create Swift-based instances of QrCameraList.
|
|
50
|
+
* ```swift
|
|
51
|
+
* class HybridQrCameraList : HybridQrCameraListSpec {
|
|
52
|
+
* // ...
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
public typealias HybridQrCameraListSpec = HybridQrCameraListSpec_protocol & HybridQrCameraListSpec_base
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridQrCameraListSpec_cxx.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A class implementation that bridges HybridQrCameraListSpec over to C++.
|
|
12
|
+
* In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
|
|
13
|
+
*
|
|
14
|
+
* Also, some Swift types need to be bridged with special handling:
|
|
15
|
+
* - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
|
|
16
|
+
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
17
|
+
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
18
|
+
*/
|
|
19
|
+
open class HybridQrCameraListSpec_cxx {
|
|
20
|
+
/**
|
|
21
|
+
* The Swift <> C++ bridge's namespace (`margelo::nitro::qrscanner::bridge::swift`)
|
|
22
|
+
* from `QrScanner-Swift-Cxx-Bridge.hpp`.
|
|
23
|
+
* This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
|
|
24
|
+
*/
|
|
25
|
+
public typealias bridge = margelo.nitro.qrscanner.bridge.swift
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Holds an instance of the `HybridQrCameraListSpec` Swift protocol.
|
|
29
|
+
*/
|
|
30
|
+
private var __implementation: any HybridQrCameraListSpec
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
34
|
+
*/
|
|
35
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridQrCameraListSpec_
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Create a new `HybridQrCameraListSpec_cxx` that wraps the given `HybridQrCameraListSpec`.
|
|
39
|
+
* All properties and methods bridge to C++ types.
|
|
40
|
+
*/
|
|
41
|
+
public init(_ implementation: any HybridQrCameraListSpec) {
|
|
42
|
+
self.__implementation = implementation
|
|
43
|
+
self.__cxxPart = .init()
|
|
44
|
+
/* no base class */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get the actual `HybridQrCameraListSpec` instance this class wraps.
|
|
49
|
+
*/
|
|
50
|
+
@inline(__always)
|
|
51
|
+
public func getHybridQrCameraListSpec() -> any HybridQrCameraListSpec {
|
|
52
|
+
return __implementation
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
57
|
+
* This acquires one additional strong reference on the object!
|
|
58
|
+
*/
|
|
59
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
60
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Casts an unsafe pointer to a `HybridQrCameraListSpec_cxx`.
|
|
65
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridQrCameraListSpec_cxx>`.
|
|
66
|
+
* This removes one strong reference from the object!
|
|
67
|
+
*/
|
|
68
|
+
public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridQrCameraListSpec_cxx {
|
|
69
|
+
return Unmanaged<HybridQrCameraListSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
74
|
+
* The C++ part is a `std::shared_ptr<HybridQrCameraListSpec>`.
|
|
75
|
+
*/
|
|
76
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridQrCameraListSpec_ {
|
|
77
|
+
let cachedCxxPart = self.__cxxPart.lock()
|
|
78
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
79
|
+
return cachedCxxPart
|
|
80
|
+
} else {
|
|
81
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridQrCameraListSpec_(self.toUnsafe())
|
|
82
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridQrCameraListSpec_(newCxxPart)
|
|
83
|
+
return newCxxPart
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
91
|
+
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
|
92
|
+
*/
|
|
93
|
+
@inline(__always)
|
|
94
|
+
public var memorySize: Int {
|
|
95
|
+
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Compares this object with the given [other] object for reference equality.
|
|
100
|
+
*/
|
|
101
|
+
@inline(__always)
|
|
102
|
+
public func equals(other: HybridQrCameraListSpec_cxx) -> Bool {
|
|
103
|
+
return self.__implementation === other.__implementation
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Call dispose() on the Swift class.
|
|
108
|
+
* This _may_ be called manually from JS.
|
|
109
|
+
*/
|
|
110
|
+
@inline(__always)
|
|
111
|
+
public func dispose() {
|
|
112
|
+
self.__implementation.dispose()
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Call toString() on the Swift class.
|
|
117
|
+
*/
|
|
118
|
+
@inline(__always)
|
|
119
|
+
public func toString() -> String {
|
|
120
|
+
return self.__implementation.toString()
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Properties
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
// Methods
|
|
127
|
+
@inline(__always)
|
|
128
|
+
public final func listCameras() -> bridge.Result_std__shared_ptr_Promise_std__vector_QrCameraInfo____ {
|
|
129
|
+
do {
|
|
130
|
+
let __result = try self.__implementation.listCameras()
|
|
131
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__vector_QrCameraInfo___ in
|
|
132
|
+
let __promise = bridge.create_std__shared_ptr_Promise_std__vector_QrCameraInfo___()
|
|
133
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__vector_QrCameraInfo___(__promise)
|
|
134
|
+
__result
|
|
135
|
+
.then({ __result in __promiseHolder.resolve({ () -> bridge.std__vector_QrCameraInfo_ in
|
|
136
|
+
var __vector = bridge.create_std__vector_QrCameraInfo_(__result.count)
|
|
137
|
+
for __item in __result {
|
|
138
|
+
__vector.push_back(__item)
|
|
139
|
+
}
|
|
140
|
+
return __vector
|
|
141
|
+
}()) })
|
|
142
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
143
|
+
return __promise
|
|
144
|
+
}()
|
|
145
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__vector_QrCameraInfo____(__resultCpp)
|
|
146
|
+
} catch (let __error) {
|
|
147
|
+
let __exceptionPtr = __error.toCpp()
|
|
148
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__vector_QrCameraInfo____(__exceptionPtr)
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@inline(__always)
|
|
153
|
+
public final func setOnChange(listener: bridge.std__optional_std__function_void____) -> bridge.Result_void_ {
|
|
154
|
+
do {
|
|
155
|
+
try self.__implementation.setOnChange(listener: { () -> (() -> Void)? in
|
|
156
|
+
if bridge.has_value_std__optional_std__function_void____(listener) {
|
|
157
|
+
let __unwrapped = bridge.get_std__optional_std__function_void____(listener)
|
|
158
|
+
return { () -> () -> Void in
|
|
159
|
+
let __wrappedFunction = bridge.wrap_Func_void(__unwrapped)
|
|
160
|
+
return { () -> Void in
|
|
161
|
+
__wrappedFunction.call()
|
|
162
|
+
}
|
|
163
|
+
}()
|
|
164
|
+
} else {
|
|
165
|
+
return nil
|
|
166
|
+
}
|
|
167
|
+
}())
|
|
168
|
+
return bridge.create_Result_void_()
|
|
169
|
+
} catch (let __error) {
|
|
170
|
+
let __exceptionPtr = __error.toCpp()
|
|
171
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -11,6 +11,7 @@ import NitroModules
|
|
|
11
11
|
public protocol HybridQrScannerSpec_protocol: HybridObject, HybridView {
|
|
12
12
|
// Properties
|
|
13
13
|
var active: Bool { get set }
|
|
14
|
+
var cameraId: String? { get set }
|
|
14
15
|
var onReady: ((_ generation: Double) -> Void)? { get set }
|
|
15
16
|
var onFrameText: ((_ text: String, _ generation: Double) -> Void)? { get set }
|
|
16
17
|
var onError: ((_ code: String, _ message: String, _ generation: Double) -> Void)? { get set }
|
|
@@ -132,6 +132,30 @@ open class HybridQrScannerSpec_cxx {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
public final var cameraId: bridge.std__optional_std__string_ {
|
|
136
|
+
@inline(__always)
|
|
137
|
+
get {
|
|
138
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
139
|
+
if let __unwrappedValue = self.__implementation.cameraId {
|
|
140
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
141
|
+
} else {
|
|
142
|
+
return .init()
|
|
143
|
+
}
|
|
144
|
+
}()
|
|
145
|
+
}
|
|
146
|
+
@inline(__always)
|
|
147
|
+
set {
|
|
148
|
+
self.__implementation.cameraId = { () -> String? in
|
|
149
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
150
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
151
|
+
return String(__unwrapped)
|
|
152
|
+
} else {
|
|
153
|
+
return nil
|
|
154
|
+
}
|
|
155
|
+
}()
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
135
159
|
public final var onReady: bridge.std__optional_std__function_void_double____generation______ {
|
|
136
160
|
@inline(__always)
|
|
137
161
|
get {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// QrCameraInfo.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `QrCameraInfo`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias QrCameraInfo = margelo.nitro.qrscanner.QrCameraInfo
|
|
14
|
+
|
|
15
|
+
public extension QrCameraInfo {
|
|
16
|
+
private typealias bridge = margelo.nitro.qrscanner.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `QrCameraInfo`.
|
|
20
|
+
*/
|
|
21
|
+
init(id: String, position: QrCameraPosition, label: String) {
|
|
22
|
+
self.init(std.string(id), position, std.string(label))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@inline(__always)
|
|
26
|
+
var id: String {
|
|
27
|
+
return String(self.__id)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@inline(__always)
|
|
31
|
+
var position: QrCameraPosition {
|
|
32
|
+
return self.__position
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@inline(__always)
|
|
36
|
+
var label: String {
|
|
37
|
+
return String(self.__label)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// QrCameraPosition.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `QrCameraPosition`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias QrCameraPosition = margelo.nitro.qrscanner.QrCameraPosition
|
|
12
|
+
|
|
13
|
+
public extension QrCameraPosition {
|
|
14
|
+
/**
|
|
15
|
+
* Get a QrCameraPosition for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "back":
|
|
21
|
+
self = .back
|
|
22
|
+
case "front":
|
|
23
|
+
self = .front
|
|
24
|
+
case "external":
|
|
25
|
+
self = .external
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this QrCameraPosition represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .back:
|
|
37
|
+
return "back"
|
|
38
|
+
case .front:
|
|
39
|
+
return "front"
|
|
40
|
+
case .external:
|
|
41
|
+
return "external"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridQrCameraListSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridQrCameraListSpec.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::qrscanner {
|
|
11
|
+
|
|
12
|
+
void HybridQrCameraListSpec::loadHybridMethods() {
|
|
13
|
+
// load base methods/properties
|
|
14
|
+
HybridObject::loadHybridMethods();
|
|
15
|
+
// load custom methods/properties
|
|
16
|
+
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
+
prototype.registerHybridMethod("listCameras", &HybridQrCameraListSpec::listCameras);
|
|
18
|
+
prototype.registerHybridMethod("setOnChange", &HybridQrCameraListSpec::setOnChange);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
} // namespace margelo::nitro::qrscanner
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridQrCameraListSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
11
|
+
#include <NitroModules/HybridObject.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
// Forward declaration of `QrCameraInfo` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::qrscanner { struct QrCameraInfo; }
|
|
18
|
+
|
|
19
|
+
#include "QrCameraInfo.hpp"
|
|
20
|
+
#include <vector>
|
|
21
|
+
#include <NitroModules/Promise.hpp>
|
|
22
|
+
#include <functional>
|
|
23
|
+
#include <optional>
|
|
24
|
+
|
|
25
|
+
namespace margelo::nitro::qrscanner {
|
|
26
|
+
|
|
27
|
+
using namespace margelo::nitro;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* An abstract base class for `QrCameraList`
|
|
31
|
+
* Inherit this class to create instances of `HybridQrCameraListSpec` in C++.
|
|
32
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
33
|
+
* @example
|
|
34
|
+
* ```cpp
|
|
35
|
+
* class HybridQrCameraList: public HybridQrCameraListSpec {
|
|
36
|
+
* public:
|
|
37
|
+
* HybridQrCameraList(...): HybridObject(TAG) { ... }
|
|
38
|
+
* // ...
|
|
39
|
+
* };
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
class HybridQrCameraListSpec: public virtual HybridObject {
|
|
43
|
+
public:
|
|
44
|
+
// Constructor
|
|
45
|
+
explicit HybridQrCameraListSpec(): HybridObject(TAG) { }
|
|
46
|
+
|
|
47
|
+
// Destructor
|
|
48
|
+
~HybridQrCameraListSpec() override = default;
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
// Properties
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
// Methods
|
|
56
|
+
virtual std::shared_ptr<Promise<std::vector<QrCameraInfo>>> listCameras() = 0;
|
|
57
|
+
virtual void setOnChange(const std::optional<std::function<void()>>& listener) = 0;
|
|
58
|
+
|
|
59
|
+
protected:
|
|
60
|
+
// Hybrid Setup
|
|
61
|
+
void loadHybridMethods() override;
|
|
62
|
+
|
|
63
|
+
protected:
|
|
64
|
+
// Tag for logging
|
|
65
|
+
static constexpr auto TAG = "QrCameraList";
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
} // namespace margelo::nitro::qrscanner
|
|
@@ -16,6 +16,8 @@ namespace margelo::nitro::qrscanner {
|
|
|
16
16
|
registerHybrids(this, [](Prototype& prototype) {
|
|
17
17
|
prototype.registerHybridGetter("active", &HybridQrScannerSpec::getActive);
|
|
18
18
|
prototype.registerHybridSetter("active", &HybridQrScannerSpec::setActive);
|
|
19
|
+
prototype.registerHybridGetter("cameraId", &HybridQrScannerSpec::getCameraId);
|
|
20
|
+
prototype.registerHybridSetter("cameraId", &HybridQrScannerSpec::setCameraId);
|
|
19
21
|
prototype.registerHybridGetter("onReady", &HybridQrScannerSpec::getOnReady);
|
|
20
22
|
prototype.registerHybridSetter("onReady", &HybridQrScannerSpec::setOnReady);
|
|
21
23
|
prototype.registerHybridGetter("onFrameText", &HybridQrScannerSpec::getOnFrameText);
|