react-native-ble-nitro 1.7.0 → 1.8.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 +12 -5
- package/android/src/main/java/com/margelo/nitro/co/zyke/ble/BleNitroBleManager.kt +15 -20
- package/ios/BleNitroBleManager.swift +10 -12
- package/lib/commonjs/index.d.ts +1 -1
- package/lib/commonjs/index.d.ts.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager.d.ts +4 -1
- package/lib/commonjs/manager.d.ts.map +1 -1
- package/lib/commonjs/manager.js +9 -10
- package/lib/commonjs/manager.js.map +1 -1
- package/lib/commonjs/singleton.js +1 -1
- package/lib/commonjs/singleton.js.map +1 -1
- package/lib/commonjs/specs/NativeBleNitro.nitro.d.ts +1 -1
- package/lib/commonjs/specs/NativeBleNitro.nitro.d.ts.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/manager.d.ts +4 -1
- package/lib/manager.js +9 -10
- package/lib/singleton.js +1 -1
- package/lib/specs/NativeBleNitro.nitro.d.ts +1 -1
- package/nitrogen/generated/android/BleNitro+autolinking.cmake +7 -4
- package/nitrogen/generated/android/BleNitroOnLoad.cpp +2 -4
- package/nitrogen/generated/android/c++/JHybridNativeBleNitroSpec.cpp +8 -7
- package/nitrogen/generated/android/c++/JHybridNativeBleNitroSpec.hpp +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/HybridNativeBleNitroSpec.kt +3 -3
- package/nitrogen/generated/ios/BleNitro-Swift-Cxx-Bridge.cpp +15 -15
- package/nitrogen/generated/ios/BleNitro-Swift-Cxx-Bridge.hpp +105 -74
- package/nitrogen/generated/ios/c++/HybridNativeBleNitroSpecSwift.hpp +8 -6
- package/nitrogen/generated/ios/swift/Func_void_std__optional_BLEDevice__std__optional_std__string_.swift +3 -8
- package/nitrogen/generated/ios/swift/HybridNativeBleNitroFactorySpec_cxx.swift +4 -2
- package/nitrogen/generated/ios/swift/HybridNativeBleNitroSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridNativeBleNitroSpec_cxx.swift +9 -11
- package/nitrogen/generated/ios/swift/OperationResult.swift +2 -1
- package/nitrogen/generated/shared/c++/BLEDevice.hpp +8 -0
- package/nitrogen/generated/shared/c++/HybridNativeBleNitroSpec.hpp +4 -4
- package/nitrogen/generated/shared/c++/ManufacturerData.hpp +8 -0
- package/nitrogen/generated/shared/c++/ManufacturerDataEntry.hpp +8 -0
- package/nitrogen/generated/shared/c++/OperationResult.hpp +8 -0
- package/nitrogen/generated/shared/c++/ScanFilter.hpp +8 -0
- package/package.json +11 -11
- package/src/__tests__/index.test.ts +4 -3
- package/src/index.ts +1 -0
- package/src/manager.ts +17 -13
- package/src/singleton.ts +1 -1
- package/src/specs/NativeBleNitro.nitro.ts +1 -1
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
16
16
|
|
|
17
17
|
// pragma MARK: std::function<void(const std::vector<BLEDevice>& /* restoredPeripherals */)>
|
|
18
|
-
Func_void_std__vector_BLEDevice_ create_Func_void_std__vector_BLEDevice_(void*
|
|
18
|
+
Func_void_std__vector_BLEDevice_ create_Func_void_std__vector_BLEDevice_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
19
19
|
auto swiftClosure = BleNitro::Func_void_std__vector_BLEDevice_::fromUnsafe(swiftClosureWrapper);
|
|
20
20
|
return [swiftClosure = std::move(swiftClosure)](const std::vector<BLEDevice>& restoredPeripherals) mutable -> void {
|
|
21
21
|
swiftClosure.call(restoredPeripherals);
|
|
@@ -23,7 +23,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
// pragma MARK: std::function<void(const std::optional<BLEDevice>& /* device */, const std::optional<std::string>& /* error */)>
|
|
26
|
-
Func_void_std__optional_BLEDevice__std__optional_std__string_ create_Func_void_std__optional_BLEDevice__std__optional_std__string_(void*
|
|
26
|
+
Func_void_std__optional_BLEDevice__std__optional_std__string_ create_Func_void_std__optional_BLEDevice__std__optional_std__string_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
27
27
|
auto swiftClosure = BleNitro::Func_void_std__optional_BLEDevice__std__optional_std__string_::fromUnsafe(swiftClosureWrapper);
|
|
28
28
|
return [swiftClosure = std::move(swiftClosure)](const std::optional<BLEDevice>& device, const std::optional<std::string>& error) mutable -> void {
|
|
29
29
|
swiftClosure.call(device, error);
|
|
@@ -31,7 +31,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// pragma MARK: std::function<void(bool /* success */, const std::string& /* deviceId */, const std::string& /* error */)>
|
|
34
|
-
Func_void_bool_std__string_std__string create_Func_void_bool_std__string_std__string(void*
|
|
34
|
+
Func_void_bool_std__string_std__string create_Func_void_bool_std__string_std__string(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
35
35
|
auto swiftClosure = BleNitro::Func_void_bool_std__string_std__string::fromUnsafe(swiftClosureWrapper);
|
|
36
36
|
return [swiftClosure = std::move(swiftClosure)](bool success, const std::string& deviceId, const std::string& error) mutable -> void {
|
|
37
37
|
swiftClosure.call(success, deviceId, error);
|
|
@@ -39,7 +39,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// pragma MARK: std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>
|
|
42
|
-
Func_void_std__string_bool_std__string create_Func_void_std__string_bool_std__string(void*
|
|
42
|
+
Func_void_std__string_bool_std__string create_Func_void_std__string_bool_std__string(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
43
43
|
auto swiftClosure = BleNitro::Func_void_std__string_bool_std__string::fromUnsafe(swiftClosureWrapper);
|
|
44
44
|
return [swiftClosure = std::move(swiftClosure)](const std::string& deviceId, bool interrupted, const std::string& error) mutable -> void {
|
|
45
45
|
swiftClosure.call(deviceId, interrupted, error);
|
|
@@ -47,7 +47,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
// pragma MARK: std::function<void(bool /* success */, const std::string& /* error */)>
|
|
50
|
-
Func_void_bool_std__string create_Func_void_bool_std__string(void*
|
|
50
|
+
Func_void_bool_std__string create_Func_void_bool_std__string(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
51
51
|
auto swiftClosure = BleNitro::Func_void_bool_std__string::fromUnsafe(swiftClosureWrapper);
|
|
52
52
|
return [swiftClosure = std::move(swiftClosure)](bool success, const std::string& error) mutable -> void {
|
|
53
53
|
swiftClosure.call(success, error);
|
|
@@ -55,7 +55,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
// pragma MARK: std::function<void(bool /* success */, double /* rssi */, const std::string& /* error */)>
|
|
58
|
-
Func_void_bool_double_std__string create_Func_void_bool_double_std__string(void*
|
|
58
|
+
Func_void_bool_double_std__string create_Func_void_bool_double_std__string(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
59
59
|
auto swiftClosure = BleNitro::Func_void_bool_double_std__string::fromUnsafe(swiftClosureWrapper);
|
|
60
60
|
return [swiftClosure = std::move(swiftClosure)](bool success, double rssi, const std::string& error) mutable -> void {
|
|
61
61
|
swiftClosure.call(success, rssi, error);
|
|
@@ -63,7 +63,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// pragma MARK: std::function<void(bool /* success */, const std::shared_ptr<ArrayBuffer>& /* data */, const std::string& /* error */)>
|
|
66
|
-
Func_void_bool_std__shared_ptr_ArrayBuffer__std__string create_Func_void_bool_std__shared_ptr_ArrayBuffer__std__string(void*
|
|
66
|
+
Func_void_bool_std__shared_ptr_ArrayBuffer__std__string create_Func_void_bool_std__shared_ptr_ArrayBuffer__std__string(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
67
67
|
auto swiftClosure = BleNitro::Func_void_bool_std__shared_ptr_ArrayBuffer__std__string::fromUnsafe(swiftClosureWrapper);
|
|
68
68
|
return [swiftClosure = std::move(swiftClosure)](bool success, const std::shared_ptr<ArrayBuffer>& data, const std::string& error) mutable -> void {
|
|
69
69
|
swiftClosure.call(success, ArrayBufferHolder(data), error);
|
|
@@ -71,7 +71,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
// pragma MARK: std::function<void(const std::string& /* characteristicId */, const std::shared_ptr<ArrayBuffer>& /* data */)>
|
|
74
|
-
Func_void_std__string_std__shared_ptr_ArrayBuffer_ create_Func_void_std__string_std__shared_ptr_ArrayBuffer_(void*
|
|
74
|
+
Func_void_std__string_std__shared_ptr_ArrayBuffer_ create_Func_void_std__string_std__shared_ptr_ArrayBuffer_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
75
75
|
auto swiftClosure = BleNitro::Func_void_std__string_std__shared_ptr_ArrayBuffer_::fromUnsafe(swiftClosureWrapper);
|
|
76
76
|
return [swiftClosure = std::move(swiftClosure)](const std::string& characteristicId, const std::shared_ptr<ArrayBuffer>& data) mutable -> void {
|
|
77
77
|
swiftClosure.call(characteristicId, ArrayBufferHolder(data));
|
|
@@ -79,7 +79,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
// pragma MARK: std::function<void(BLEState /* state */)>
|
|
82
|
-
Func_void_BLEState create_Func_void_BLEState(void*
|
|
82
|
+
Func_void_BLEState create_Func_void_BLEState(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
83
83
|
auto swiftClosure = BleNitro::Func_void_BLEState::fromUnsafe(swiftClosureWrapper);
|
|
84
84
|
return [swiftClosure = std::move(swiftClosure)](BLEState state) mutable -> void {
|
|
85
85
|
swiftClosure.call(static_cast<int>(state));
|
|
@@ -87,7 +87,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// pragma MARK: std::function<void()>
|
|
90
|
-
Func_void create_Func_void(void*
|
|
90
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
91
91
|
auto swiftClosure = BleNitro::Func_void::fromUnsafe(swiftClosureWrapper);
|
|
92
92
|
return [swiftClosure = std::move(swiftClosure)]() mutable -> void {
|
|
93
93
|
swiftClosure.call();
|
|
@@ -95,7 +95,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
98
|
-
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void*
|
|
98
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
99
99
|
auto swiftClosure = BleNitro::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
|
|
100
100
|
return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
|
|
101
101
|
swiftClosure.call(error);
|
|
@@ -103,11 +103,11 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// pragma MARK: std::shared_ptr<HybridNativeBleNitroSpec>
|
|
106
|
-
std::shared_ptr<HybridNativeBleNitroSpec> create_std__shared_ptr_HybridNativeBleNitroSpec_(void*
|
|
106
|
+
std::shared_ptr<HybridNativeBleNitroSpec> create_std__shared_ptr_HybridNativeBleNitroSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
107
107
|
BleNitro::HybridNativeBleNitroSpec_cxx swiftPart = BleNitro::HybridNativeBleNitroSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
108
108
|
return std::make_shared<margelo::nitro::co::zyke::ble::HybridNativeBleNitroSpecSwift>(swiftPart);
|
|
109
109
|
}
|
|
110
|
-
void*
|
|
110
|
+
void* NON_NULL get_std__shared_ptr_HybridNativeBleNitroSpec_(std__shared_ptr_HybridNativeBleNitroSpec_ cppType) {
|
|
111
111
|
std::shared_ptr<margelo::nitro::co::zyke::ble::HybridNativeBleNitroSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::co::zyke::ble::HybridNativeBleNitroSpecSwift>(cppType);
|
|
112
112
|
#ifdef NITRO_DEBUG
|
|
113
113
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -119,11 +119,11 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
// pragma MARK: std::shared_ptr<HybridNativeBleNitroFactorySpec>
|
|
122
|
-
std::shared_ptr<HybridNativeBleNitroFactorySpec> create_std__shared_ptr_HybridNativeBleNitroFactorySpec_(void*
|
|
122
|
+
std::shared_ptr<HybridNativeBleNitroFactorySpec> create_std__shared_ptr_HybridNativeBleNitroFactorySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
123
123
|
BleNitro::HybridNativeBleNitroFactorySpec_cxx swiftPart = BleNitro::HybridNativeBleNitroFactorySpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
124
124
|
return std::make_shared<margelo::nitro::co::zyke::ble::HybridNativeBleNitroFactorySpecSwift>(swiftPart);
|
|
125
125
|
}
|
|
126
|
-
void*
|
|
126
|
+
void* NON_NULL get_std__shared_ptr_HybridNativeBleNitroFactorySpec_(std__shared_ptr_HybridNativeBleNitroFactorySpec_ cppType) {
|
|
127
127
|
std::shared_ptr<margelo::nitro::co::zyke::ble::HybridNativeBleNitroFactorySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::co::zyke::ble::HybridNativeBleNitroFactorySpecSwift>(cppType);
|
|
128
128
|
#ifdef NITRO_DEBUG
|
|
129
129
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
@@ -43,6 +43,7 @@ namespace BleNitro { class HybridNativeBleNitroSpec_cxx; }
|
|
|
43
43
|
#include "OperationResult.hpp"
|
|
44
44
|
#include <NitroModules/ArrayBuffer.hpp>
|
|
45
45
|
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
46
|
+
#include <NitroModules/FastVectorCopy.hpp>
|
|
46
47
|
#include <NitroModules/Promise.hpp>
|
|
47
48
|
#include <NitroModules/PromiseHolder.hpp>
|
|
48
49
|
#include <NitroModules/Result.hpp>
|
|
@@ -64,16 +65,22 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
64
65
|
* Specialized version of `std::optional<std::string>`.
|
|
65
66
|
*/
|
|
66
67
|
using std__optional_std__string_ = std::optional<std::string>;
|
|
67
|
-
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) {
|
|
68
|
+
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
|
|
68
69
|
return std::optional<std::string>(value);
|
|
69
70
|
}
|
|
71
|
+
inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
72
|
+
return optional.has_value();
|
|
73
|
+
}
|
|
74
|
+
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
75
|
+
return *optional;
|
|
76
|
+
}
|
|
70
77
|
|
|
71
78
|
// pragma MARK: std::vector<ManufacturerDataEntry>
|
|
72
79
|
/**
|
|
73
80
|
* Specialized version of `std::vector<ManufacturerDataEntry>`.
|
|
74
81
|
*/
|
|
75
82
|
using std__vector_ManufacturerDataEntry_ = std::vector<ManufacturerDataEntry>;
|
|
76
|
-
inline std::vector<ManufacturerDataEntry> create_std__vector_ManufacturerDataEntry_(size_t size) {
|
|
83
|
+
inline std::vector<ManufacturerDataEntry> create_std__vector_ManufacturerDataEntry_(size_t size) noexcept {
|
|
77
84
|
std::vector<ManufacturerDataEntry> vector;
|
|
78
85
|
vector.reserve(size);
|
|
79
86
|
return vector;
|
|
@@ -84,7 +91,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
84
91
|
* Specialized version of `std::vector<std::string>`.
|
|
85
92
|
*/
|
|
86
93
|
using std__vector_std__string_ = std::vector<std::string>;
|
|
87
|
-
inline std::vector<std::string> create_std__vector_std__string_(size_t size) {
|
|
94
|
+
inline std::vector<std::string> create_std__vector_std__string_(size_t size) noexcept {
|
|
88
95
|
std::vector<std::string> vector;
|
|
89
96
|
vector.reserve(size);
|
|
90
97
|
return vector;
|
|
@@ -95,7 +102,7 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
95
102
|
* Specialized version of `std::vector<BLEDevice>`.
|
|
96
103
|
*/
|
|
97
104
|
using std__vector_BLEDevice_ = std::vector<BLEDevice>;
|
|
98
|
-
inline std::vector<BLEDevice> create_std__vector_BLEDevice_(size_t size) {
|
|
105
|
+
inline std::vector<BLEDevice> create_std__vector_BLEDevice_(size_t size) noexcept {
|
|
99
106
|
std::vector<BLEDevice> vector;
|
|
100
107
|
vector.reserve(size);
|
|
101
108
|
return vector;
|
|
@@ -112,14 +119,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
112
119
|
class Func_void_std__vector_BLEDevice__Wrapper final {
|
|
113
120
|
public:
|
|
114
121
|
explicit Func_void_std__vector_BLEDevice__Wrapper(std::function<void(const std::vector<BLEDevice>& /* restoredPeripherals */)>&& func): _function(std::make_unique<std::function<void(const std::vector<BLEDevice>& /* restoredPeripherals */)>>(std::move(func))) {}
|
|
115
|
-
inline void call(std::vector<BLEDevice> restoredPeripherals) const {
|
|
122
|
+
inline void call(std::vector<BLEDevice> restoredPeripherals) const noexcept {
|
|
116
123
|
_function->operator()(restoredPeripherals);
|
|
117
124
|
}
|
|
118
125
|
private:
|
|
119
126
|
std::unique_ptr<std::function<void(const std::vector<BLEDevice>& /* restoredPeripherals */)>> _function;
|
|
120
127
|
} SWIFT_NONCOPYABLE;
|
|
121
|
-
Func_void_std__vector_BLEDevice_ create_Func_void_std__vector_BLEDevice_(void*
|
|
122
|
-
inline Func_void_std__vector_BLEDevice__Wrapper wrap_Func_void_std__vector_BLEDevice_(Func_void_std__vector_BLEDevice_ value) {
|
|
128
|
+
Func_void_std__vector_BLEDevice_ create_Func_void_std__vector_BLEDevice_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
129
|
+
inline Func_void_std__vector_BLEDevice__Wrapper wrap_Func_void_std__vector_BLEDevice_(Func_void_std__vector_BLEDevice_ value) noexcept {
|
|
123
130
|
return Func_void_std__vector_BLEDevice__Wrapper(std::move(value));
|
|
124
131
|
}
|
|
125
132
|
|
|
@@ -128,9 +135,15 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
128
135
|
* Specialized version of `std::optional<BLEDevice>`.
|
|
129
136
|
*/
|
|
130
137
|
using std__optional_BLEDevice_ = std::optional<BLEDevice>;
|
|
131
|
-
inline std::optional<BLEDevice> create_std__optional_BLEDevice_(const BLEDevice& value) {
|
|
138
|
+
inline std::optional<BLEDevice> create_std__optional_BLEDevice_(const BLEDevice& value) noexcept {
|
|
132
139
|
return std::optional<BLEDevice>(value);
|
|
133
140
|
}
|
|
141
|
+
inline bool has_value_std__optional_BLEDevice_(const std::optional<BLEDevice>& optional) noexcept {
|
|
142
|
+
return optional.has_value();
|
|
143
|
+
}
|
|
144
|
+
inline BLEDevice get_std__optional_BLEDevice_(const std::optional<BLEDevice>& optional) noexcept {
|
|
145
|
+
return *optional;
|
|
146
|
+
}
|
|
134
147
|
|
|
135
148
|
// pragma MARK: std::function<void(const std::optional<BLEDevice>& /* device */, const std::optional<std::string>& /* error */)>
|
|
136
149
|
/**
|
|
@@ -143,14 +156,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
143
156
|
class Func_void_std__optional_BLEDevice__std__optional_std__string__Wrapper final {
|
|
144
157
|
public:
|
|
145
158
|
explicit Func_void_std__optional_BLEDevice__std__optional_std__string__Wrapper(std::function<void(const std::optional<BLEDevice>& /* device */, const std::optional<std::string>& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::optional<BLEDevice>& /* device */, const std::optional<std::string>& /* error */)>>(std::move(func))) {}
|
|
146
|
-
inline void call(std::optional<BLEDevice> device, std::optional<std::string> error) const {
|
|
159
|
+
inline void call(std::optional<BLEDevice> device, std::optional<std::string> error) const noexcept {
|
|
147
160
|
_function->operator()(device, error);
|
|
148
161
|
}
|
|
149
162
|
private:
|
|
150
163
|
std::unique_ptr<std::function<void(const std::optional<BLEDevice>& /* device */, const std::optional<std::string>& /* error */)>> _function;
|
|
151
164
|
} SWIFT_NONCOPYABLE;
|
|
152
|
-
Func_void_std__optional_BLEDevice__std__optional_std__string_ create_Func_void_std__optional_BLEDevice__std__optional_std__string_(void*
|
|
153
|
-
inline Func_void_std__optional_BLEDevice__std__optional_std__string__Wrapper wrap_Func_void_std__optional_BLEDevice__std__optional_std__string_(Func_void_std__optional_BLEDevice__std__optional_std__string_ value) {
|
|
165
|
+
Func_void_std__optional_BLEDevice__std__optional_std__string_ create_Func_void_std__optional_BLEDevice__std__optional_std__string_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
166
|
+
inline Func_void_std__optional_BLEDevice__std__optional_std__string__Wrapper wrap_Func_void_std__optional_BLEDevice__std__optional_std__string_(Func_void_std__optional_BLEDevice__std__optional_std__string_ value) noexcept {
|
|
154
167
|
return Func_void_std__optional_BLEDevice__std__optional_std__string__Wrapper(std::move(value));
|
|
155
168
|
}
|
|
156
169
|
|
|
@@ -165,14 +178,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
165
178
|
class Func_void_bool_std__string_std__string_Wrapper final {
|
|
166
179
|
public:
|
|
167
180
|
explicit Func_void_bool_std__string_std__string_Wrapper(std::function<void(bool /* success */, const std::string& /* deviceId */, const std::string& /* error */)>&& func): _function(std::make_unique<std::function<void(bool /* success */, const std::string& /* deviceId */, const std::string& /* error */)>>(std::move(func))) {}
|
|
168
|
-
inline void call(bool success, std::string deviceId, std::string error) const {
|
|
181
|
+
inline void call(bool success, std::string deviceId, std::string error) const noexcept {
|
|
169
182
|
_function->operator()(success, deviceId, error);
|
|
170
183
|
}
|
|
171
184
|
private:
|
|
172
185
|
std::unique_ptr<std::function<void(bool /* success */, const std::string& /* deviceId */, const std::string& /* error */)>> _function;
|
|
173
186
|
} SWIFT_NONCOPYABLE;
|
|
174
|
-
Func_void_bool_std__string_std__string create_Func_void_bool_std__string_std__string(void*
|
|
175
|
-
inline Func_void_bool_std__string_std__string_Wrapper wrap_Func_void_bool_std__string_std__string(Func_void_bool_std__string_std__string value) {
|
|
187
|
+
Func_void_bool_std__string_std__string create_Func_void_bool_std__string_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
188
|
+
inline Func_void_bool_std__string_std__string_Wrapper wrap_Func_void_bool_std__string_std__string(Func_void_bool_std__string_std__string value) noexcept {
|
|
176
189
|
return Func_void_bool_std__string_std__string_Wrapper(std::move(value));
|
|
177
190
|
}
|
|
178
191
|
|
|
@@ -187,14 +200,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
187
200
|
class Func_void_std__string_bool_std__string_Wrapper final {
|
|
188
201
|
public:
|
|
189
202
|
explicit Func_void_std__string_bool_std__string_Wrapper(std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>>(std::move(func))) {}
|
|
190
|
-
inline void call(std::string deviceId, bool interrupted, std::string error) const {
|
|
203
|
+
inline void call(std::string deviceId, bool interrupted, std::string error) const noexcept {
|
|
191
204
|
_function->operator()(deviceId, interrupted, error);
|
|
192
205
|
}
|
|
193
206
|
private:
|
|
194
207
|
std::unique_ptr<std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>> _function;
|
|
195
208
|
} SWIFT_NONCOPYABLE;
|
|
196
|
-
Func_void_std__string_bool_std__string create_Func_void_std__string_bool_std__string(void*
|
|
197
|
-
inline Func_void_std__string_bool_std__string_Wrapper wrap_Func_void_std__string_bool_std__string(Func_void_std__string_bool_std__string value) {
|
|
209
|
+
Func_void_std__string_bool_std__string create_Func_void_std__string_bool_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
210
|
+
inline Func_void_std__string_bool_std__string_Wrapper wrap_Func_void_std__string_bool_std__string(Func_void_std__string_bool_std__string value) noexcept {
|
|
198
211
|
return Func_void_std__string_bool_std__string_Wrapper(std::move(value));
|
|
199
212
|
}
|
|
200
213
|
|
|
@@ -203,18 +216,30 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
203
216
|
* Specialized version of `std::optional<std::function<void(const std::string& / * deviceId * /, bool / * interrupted * /, const std::string& / * error * /)>>`.
|
|
204
217
|
*/
|
|
205
218
|
using std__optional_std__function_void_const_std__string_____deviceId_____bool____interrupted_____const_std__string_____error______ = std::optional<std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>>;
|
|
206
|
-
inline std::optional<std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>> create_std__optional_std__function_void_const_std__string_____deviceId_____bool____interrupted_____const_std__string_____error______(const std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>& value) {
|
|
219
|
+
inline std::optional<std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>> create_std__optional_std__function_void_const_std__string_____deviceId_____bool____interrupted_____const_std__string_____error______(const std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>& value) noexcept {
|
|
207
220
|
return std::optional<std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>>(value);
|
|
208
221
|
}
|
|
222
|
+
inline bool has_value_std__optional_std__function_void_const_std__string_____deviceId_____bool____interrupted_____const_std__string_____error______(const std::optional<std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>>& optional) noexcept {
|
|
223
|
+
return optional.has_value();
|
|
224
|
+
}
|
|
225
|
+
inline std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)> get_std__optional_std__function_void_const_std__string_____deviceId_____bool____interrupted_____const_std__string_____error______(const std::optional<std::function<void(const std::string& /* deviceId */, bool /* interrupted */, const std::string& /* error */)>>& optional) noexcept {
|
|
226
|
+
return *optional;
|
|
227
|
+
}
|
|
209
228
|
|
|
210
229
|
// pragma MARK: std::optional<bool>
|
|
211
230
|
/**
|
|
212
231
|
* Specialized version of `std::optional<bool>`.
|
|
213
232
|
*/
|
|
214
233
|
using std__optional_bool_ = std::optional<bool>;
|
|
215
|
-
inline std::optional<bool> create_std__optional_bool_(const bool& value) {
|
|
234
|
+
inline std::optional<bool> create_std__optional_bool_(const bool& value) noexcept {
|
|
216
235
|
return std::optional<bool>(value);
|
|
217
236
|
}
|
|
237
|
+
inline bool has_value_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
238
|
+
return optional.has_value();
|
|
239
|
+
}
|
|
240
|
+
inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
241
|
+
return *optional;
|
|
242
|
+
}
|
|
218
243
|
|
|
219
244
|
// pragma MARK: std::function<void(bool /* success */, const std::string& /* error */)>
|
|
220
245
|
/**
|
|
@@ -227,14 +252,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
227
252
|
class Func_void_bool_std__string_Wrapper final {
|
|
228
253
|
public:
|
|
229
254
|
explicit Func_void_bool_std__string_Wrapper(std::function<void(bool /* success */, const std::string& /* error */)>&& func): _function(std::make_unique<std::function<void(bool /* success */, const std::string& /* error */)>>(std::move(func))) {}
|
|
230
|
-
inline void call(bool success, std::string error) const {
|
|
255
|
+
inline void call(bool success, std::string error) const noexcept {
|
|
231
256
|
_function->operator()(success, error);
|
|
232
257
|
}
|
|
233
258
|
private:
|
|
234
259
|
std::unique_ptr<std::function<void(bool /* success */, const std::string& /* error */)>> _function;
|
|
235
260
|
} SWIFT_NONCOPYABLE;
|
|
236
|
-
Func_void_bool_std__string create_Func_void_bool_std__string(void*
|
|
237
|
-
inline Func_void_bool_std__string_Wrapper wrap_Func_void_bool_std__string(Func_void_bool_std__string value) {
|
|
261
|
+
Func_void_bool_std__string create_Func_void_bool_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
262
|
+
inline Func_void_bool_std__string_Wrapper wrap_Func_void_bool_std__string(Func_void_bool_std__string value) noexcept {
|
|
238
263
|
return Func_void_bool_std__string_Wrapper(std::move(value));
|
|
239
264
|
}
|
|
240
265
|
|
|
@@ -249,14 +274,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
249
274
|
class Func_void_bool_double_std__string_Wrapper final {
|
|
250
275
|
public:
|
|
251
276
|
explicit Func_void_bool_double_std__string_Wrapper(std::function<void(bool /* success */, double /* rssi */, const std::string& /* error */)>&& func): _function(std::make_unique<std::function<void(bool /* success */, double /* rssi */, const std::string& /* error */)>>(std::move(func))) {}
|
|
252
|
-
inline void call(bool success, double rssi, std::string error) const {
|
|
277
|
+
inline void call(bool success, double rssi, std::string error) const noexcept {
|
|
253
278
|
_function->operator()(success, rssi, error);
|
|
254
279
|
}
|
|
255
280
|
private:
|
|
256
281
|
std::unique_ptr<std::function<void(bool /* success */, double /* rssi */, const std::string& /* error */)>> _function;
|
|
257
282
|
} SWIFT_NONCOPYABLE;
|
|
258
|
-
Func_void_bool_double_std__string create_Func_void_bool_double_std__string(void*
|
|
259
|
-
inline Func_void_bool_double_std__string_Wrapper wrap_Func_void_bool_double_std__string(Func_void_bool_double_std__string value) {
|
|
283
|
+
Func_void_bool_double_std__string create_Func_void_bool_double_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
284
|
+
inline Func_void_bool_double_std__string_Wrapper wrap_Func_void_bool_double_std__string(Func_void_bool_double_std__string value) noexcept {
|
|
260
285
|
return Func_void_bool_double_std__string_Wrapper(std::move(value));
|
|
261
286
|
}
|
|
262
287
|
|
|
@@ -271,14 +296,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
271
296
|
class Func_void_bool_std__shared_ptr_ArrayBuffer__std__string_Wrapper final {
|
|
272
297
|
public:
|
|
273
298
|
explicit Func_void_bool_std__shared_ptr_ArrayBuffer__std__string_Wrapper(std::function<void(bool /* success */, const std::shared_ptr<ArrayBuffer>& /* data */, const std::string& /* error */)>&& func): _function(std::make_unique<std::function<void(bool /* success */, const std::shared_ptr<ArrayBuffer>& /* data */, const std::string& /* error */)>>(std::move(func))) {}
|
|
274
|
-
inline void call(bool success, ArrayBufferHolder data, std::string error) const {
|
|
299
|
+
inline void call(bool success, ArrayBufferHolder data, std::string error) const noexcept {
|
|
275
300
|
_function->operator()(success, data.getArrayBuffer(), error);
|
|
276
301
|
}
|
|
277
302
|
private:
|
|
278
303
|
std::unique_ptr<std::function<void(bool /* success */, const std::shared_ptr<ArrayBuffer>& /* data */, const std::string& /* error */)>> _function;
|
|
279
304
|
} SWIFT_NONCOPYABLE;
|
|
280
|
-
Func_void_bool_std__shared_ptr_ArrayBuffer__std__string create_Func_void_bool_std__shared_ptr_ArrayBuffer__std__string(void*
|
|
281
|
-
inline Func_void_bool_std__shared_ptr_ArrayBuffer__std__string_Wrapper wrap_Func_void_bool_std__shared_ptr_ArrayBuffer__std__string(Func_void_bool_std__shared_ptr_ArrayBuffer__std__string value) {
|
|
305
|
+
Func_void_bool_std__shared_ptr_ArrayBuffer__std__string create_Func_void_bool_std__shared_ptr_ArrayBuffer__std__string(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
306
|
+
inline Func_void_bool_std__shared_ptr_ArrayBuffer__std__string_Wrapper wrap_Func_void_bool_std__shared_ptr_ArrayBuffer__std__string(Func_void_bool_std__shared_ptr_ArrayBuffer__std__string value) noexcept {
|
|
282
307
|
return Func_void_bool_std__shared_ptr_ArrayBuffer__std__string_Wrapper(std::move(value));
|
|
283
308
|
}
|
|
284
309
|
|
|
@@ -293,14 +318,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
293
318
|
class Func_void_std__string_std__shared_ptr_ArrayBuffer__Wrapper final {
|
|
294
319
|
public:
|
|
295
320
|
explicit Func_void_std__string_std__shared_ptr_ArrayBuffer__Wrapper(std::function<void(const std::string& /* characteristicId */, const std::shared_ptr<ArrayBuffer>& /* data */)>&& func): _function(std::make_unique<std::function<void(const std::string& /* characteristicId */, const std::shared_ptr<ArrayBuffer>& /* data */)>>(std::move(func))) {}
|
|
296
|
-
inline void call(std::string characteristicId, ArrayBufferHolder data) const {
|
|
321
|
+
inline void call(std::string characteristicId, ArrayBufferHolder data) const noexcept {
|
|
297
322
|
_function->operator()(characteristicId, data.getArrayBuffer());
|
|
298
323
|
}
|
|
299
324
|
private:
|
|
300
325
|
std::unique_ptr<std::function<void(const std::string& /* characteristicId */, const std::shared_ptr<ArrayBuffer>& /* data */)>> _function;
|
|
301
326
|
} SWIFT_NONCOPYABLE;
|
|
302
|
-
Func_void_std__string_std__shared_ptr_ArrayBuffer_ create_Func_void_std__string_std__shared_ptr_ArrayBuffer_(void*
|
|
303
|
-
inline Func_void_std__string_std__shared_ptr_ArrayBuffer__Wrapper wrap_Func_void_std__string_std__shared_ptr_ArrayBuffer_(Func_void_std__string_std__shared_ptr_ArrayBuffer_ value) {
|
|
327
|
+
Func_void_std__string_std__shared_ptr_ArrayBuffer_ create_Func_void_std__string_std__shared_ptr_ArrayBuffer_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
328
|
+
inline Func_void_std__string_std__shared_ptr_ArrayBuffer__Wrapper wrap_Func_void_std__string_std__shared_ptr_ArrayBuffer_(Func_void_std__string_std__shared_ptr_ArrayBuffer_ value) noexcept {
|
|
304
329
|
return Func_void_std__string_std__shared_ptr_ArrayBuffer__Wrapper(std::move(value));
|
|
305
330
|
}
|
|
306
331
|
|
|
@@ -315,14 +340,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
315
340
|
class Func_void_BLEState_Wrapper final {
|
|
316
341
|
public:
|
|
317
342
|
explicit Func_void_BLEState_Wrapper(std::function<void(BLEState /* state */)>&& func): _function(std::make_unique<std::function<void(BLEState /* state */)>>(std::move(func))) {}
|
|
318
|
-
inline void call(int state) const {
|
|
343
|
+
inline void call(int state) const noexcept {
|
|
319
344
|
_function->operator()(static_cast<BLEState>(state));
|
|
320
345
|
}
|
|
321
346
|
private:
|
|
322
347
|
std::unique_ptr<std::function<void(BLEState /* state */)>> _function;
|
|
323
348
|
} SWIFT_NONCOPYABLE;
|
|
324
|
-
Func_void_BLEState create_Func_void_BLEState(void*
|
|
325
|
-
inline Func_void_BLEState_Wrapper wrap_Func_void_BLEState(Func_void_BLEState value) {
|
|
349
|
+
Func_void_BLEState create_Func_void_BLEState(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
350
|
+
inline Func_void_BLEState_Wrapper wrap_Func_void_BLEState(Func_void_BLEState value) noexcept {
|
|
326
351
|
return Func_void_BLEState_Wrapper(std::move(value));
|
|
327
352
|
}
|
|
328
353
|
|
|
@@ -331,10 +356,10 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
331
356
|
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
332
357
|
*/
|
|
333
358
|
using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
|
|
334
|
-
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() {
|
|
359
|
+
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
|
|
335
360
|
return Promise<void>::create();
|
|
336
361
|
}
|
|
337
|
-
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) {
|
|
362
|
+
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
|
|
338
363
|
return PromiseHolder<void>(std::move(promise));
|
|
339
364
|
}
|
|
340
365
|
|
|
@@ -349,14 +374,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
349
374
|
class Func_void_Wrapper final {
|
|
350
375
|
public:
|
|
351
376
|
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
|
|
352
|
-
inline void call() const {
|
|
377
|
+
inline void call() const noexcept {
|
|
353
378
|
_function->operator()();
|
|
354
379
|
}
|
|
355
380
|
private:
|
|
356
381
|
std::unique_ptr<std::function<void()>> _function;
|
|
357
382
|
} SWIFT_NONCOPYABLE;
|
|
358
|
-
Func_void create_Func_void(void*
|
|
359
|
-
inline Func_void_Wrapper wrap_Func_void(Func_void value) {
|
|
383
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
384
|
+
inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
|
|
360
385
|
return Func_void_Wrapper(std::move(value));
|
|
361
386
|
}
|
|
362
387
|
|
|
@@ -371,14 +396,14 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
371
396
|
class Func_void_std__exception_ptr_Wrapper final {
|
|
372
397
|
public:
|
|
373
398
|
explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
|
|
374
|
-
inline void call(std::exception_ptr error) const {
|
|
399
|
+
inline void call(std::exception_ptr error) const noexcept {
|
|
375
400
|
_function->operator()(error);
|
|
376
401
|
}
|
|
377
402
|
private:
|
|
378
403
|
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
379
404
|
} SWIFT_NONCOPYABLE;
|
|
380
|
-
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void*
|
|
381
|
-
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) {
|
|
405
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
406
|
+
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
|
|
382
407
|
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
383
408
|
}
|
|
384
409
|
|
|
@@ -387,82 +412,82 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
387
412
|
* Specialized version of `std::shared_ptr<HybridNativeBleNitroSpec>`.
|
|
388
413
|
*/
|
|
389
414
|
using std__shared_ptr_HybridNativeBleNitroSpec_ = std::shared_ptr<HybridNativeBleNitroSpec>;
|
|
390
|
-
std::shared_ptr<HybridNativeBleNitroSpec> create_std__shared_ptr_HybridNativeBleNitroSpec_(void*
|
|
391
|
-
void*
|
|
415
|
+
std::shared_ptr<HybridNativeBleNitroSpec> create_std__shared_ptr_HybridNativeBleNitroSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
416
|
+
void* NON_NULL get_std__shared_ptr_HybridNativeBleNitroSpec_(std__shared_ptr_HybridNativeBleNitroSpec_ cppType);
|
|
392
417
|
|
|
393
418
|
// pragma MARK: std::weak_ptr<HybridNativeBleNitroSpec>
|
|
394
419
|
using std__weak_ptr_HybridNativeBleNitroSpec_ = std::weak_ptr<HybridNativeBleNitroSpec>;
|
|
395
|
-
inline std__weak_ptr_HybridNativeBleNitroSpec_ weakify_std__shared_ptr_HybridNativeBleNitroSpec_(const std::shared_ptr<HybridNativeBleNitroSpec>& strong) { return strong; }
|
|
420
|
+
inline std__weak_ptr_HybridNativeBleNitroSpec_ weakify_std__shared_ptr_HybridNativeBleNitroSpec_(const std::shared_ptr<HybridNativeBleNitroSpec>& strong) noexcept { return strong; }
|
|
396
421
|
|
|
397
422
|
// pragma MARK: Result<void>
|
|
398
423
|
using Result_void_ = Result<void>;
|
|
399
|
-
inline Result_void_ create_Result_void_() {
|
|
424
|
+
inline Result_void_ create_Result_void_() noexcept {
|
|
400
425
|
return Result<void>::withValue();
|
|
401
426
|
}
|
|
402
|
-
inline Result_void_ create_Result_void_(const std::exception_ptr& error) {
|
|
427
|
+
inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
|
|
403
428
|
return Result<void>::withError(error);
|
|
404
429
|
}
|
|
405
430
|
|
|
406
431
|
// pragma MARK: Result<bool>
|
|
407
432
|
using Result_bool_ = Result<bool>;
|
|
408
|
-
inline Result_bool_ create_Result_bool_(bool value) {
|
|
433
|
+
inline Result_bool_ create_Result_bool_(bool value) noexcept {
|
|
409
434
|
return Result<bool>::withValue(std::move(value));
|
|
410
435
|
}
|
|
411
|
-
inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) {
|
|
436
|
+
inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) noexcept {
|
|
412
437
|
return Result<bool>::withError(error);
|
|
413
438
|
}
|
|
414
439
|
|
|
415
440
|
// pragma MARK: Result<std::vector<BLEDevice>>
|
|
416
441
|
using Result_std__vector_BLEDevice__ = Result<std::vector<BLEDevice>>;
|
|
417
|
-
inline Result_std__vector_BLEDevice__ create_Result_std__vector_BLEDevice__(const std::vector<BLEDevice>& value) {
|
|
442
|
+
inline Result_std__vector_BLEDevice__ create_Result_std__vector_BLEDevice__(const std::vector<BLEDevice>& value) noexcept {
|
|
418
443
|
return Result<std::vector<BLEDevice>>::withValue(value);
|
|
419
444
|
}
|
|
420
|
-
inline Result_std__vector_BLEDevice__ create_Result_std__vector_BLEDevice__(const std::exception_ptr& error) {
|
|
445
|
+
inline Result_std__vector_BLEDevice__ create_Result_std__vector_BLEDevice__(const std::exception_ptr& error) noexcept {
|
|
421
446
|
return Result<std::vector<BLEDevice>>::withError(error);
|
|
422
447
|
}
|
|
423
448
|
|
|
424
449
|
// pragma MARK: Result<double>
|
|
425
450
|
using Result_double_ = Result<double>;
|
|
426
|
-
inline Result_double_ create_Result_double_(double value) {
|
|
451
|
+
inline Result_double_ create_Result_double_(double value) noexcept {
|
|
427
452
|
return Result<double>::withValue(std::move(value));
|
|
428
453
|
}
|
|
429
|
-
inline Result_double_ create_Result_double_(const std::exception_ptr& error) {
|
|
454
|
+
inline Result_double_ create_Result_double_(const std::exception_ptr& error) noexcept {
|
|
430
455
|
return Result<double>::withError(error);
|
|
431
456
|
}
|
|
432
457
|
|
|
433
458
|
// pragma MARK: Result<std::vector<std::string>>
|
|
434
459
|
using Result_std__vector_std__string__ = Result<std::vector<std::string>>;
|
|
435
|
-
inline Result_std__vector_std__string__ create_Result_std__vector_std__string__(const std::vector<std::string>& value) {
|
|
460
|
+
inline Result_std__vector_std__string__ create_Result_std__vector_std__string__(const std::vector<std::string>& value) noexcept {
|
|
436
461
|
return Result<std::vector<std::string>>::withValue(value);
|
|
437
462
|
}
|
|
438
|
-
inline Result_std__vector_std__string__ create_Result_std__vector_std__string__(const std::exception_ptr& error) {
|
|
463
|
+
inline Result_std__vector_std__string__ create_Result_std__vector_std__string__(const std::exception_ptr& error) noexcept {
|
|
439
464
|
return Result<std::vector<std::string>>::withError(error);
|
|
440
465
|
}
|
|
441
466
|
|
|
442
|
-
// pragma MARK: Result<BLEState>
|
|
443
|
-
using Result_BLEState_ = Result<BLEState>;
|
|
444
|
-
inline Result_BLEState_ create_Result_BLEState_(BLEState value) {
|
|
445
|
-
return Result<BLEState>::withValue(std::move(value));
|
|
446
|
-
}
|
|
447
|
-
inline Result_BLEState_ create_Result_BLEState_(const std::exception_ptr& error) {
|
|
448
|
-
return Result<BLEState>::withError(error);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
467
|
// pragma MARK: Result<OperationResult>
|
|
452
468
|
using Result_OperationResult_ = Result<OperationResult>;
|
|
453
|
-
inline Result_OperationResult_ create_Result_OperationResult_(const OperationResult& value) {
|
|
469
|
+
inline Result_OperationResult_ create_Result_OperationResult_(const OperationResult& value) noexcept {
|
|
454
470
|
return Result<OperationResult>::withValue(value);
|
|
455
471
|
}
|
|
456
|
-
inline Result_OperationResult_ create_Result_OperationResult_(const std::exception_ptr& error) {
|
|
472
|
+
inline Result_OperationResult_ create_Result_OperationResult_(const std::exception_ptr& error) noexcept {
|
|
457
473
|
return Result<OperationResult>::withError(error);
|
|
458
474
|
}
|
|
459
475
|
|
|
476
|
+
// pragma MARK: Result<BLEState>
|
|
477
|
+
using Result_BLEState_ = Result<BLEState>;
|
|
478
|
+
inline Result_BLEState_ create_Result_BLEState_(BLEState value) noexcept {
|
|
479
|
+
return Result<BLEState>::withValue(std::move(value));
|
|
480
|
+
}
|
|
481
|
+
inline Result_BLEState_ create_Result_BLEState_(const std::exception_ptr& error) noexcept {
|
|
482
|
+
return Result<BLEState>::withError(error);
|
|
483
|
+
}
|
|
484
|
+
|
|
460
485
|
// pragma MARK: Result<std::shared_ptr<Promise<void>>>
|
|
461
486
|
using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
|
|
462
|
-
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) {
|
|
487
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
|
|
463
488
|
return Result<std::shared_ptr<Promise<void>>>::withValue(value);
|
|
464
489
|
}
|
|
465
|
-
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) {
|
|
490
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
|
|
466
491
|
return Result<std::shared_ptr<Promise<void>>>::withError(error);
|
|
467
492
|
}
|
|
468
493
|
|
|
@@ -471,28 +496,34 @@ namespace margelo::nitro::co::zyke::ble::bridge::swift {
|
|
|
471
496
|
* Specialized version of `std::optional<std::function<void(const std::vector<BLEDevice>& / * peripherals * /)>>`.
|
|
472
497
|
*/
|
|
473
498
|
using std__optional_std__function_void_const_std__vector_BLEDevice______peripherals______ = std::optional<std::function<void(const std::vector<BLEDevice>& /* peripherals */)>>;
|
|
474
|
-
inline std::optional<std::function<void(const std::vector<BLEDevice>& /* peripherals */)>> create_std__optional_std__function_void_const_std__vector_BLEDevice______peripherals______(const std::function<void(const std::vector<BLEDevice>& /* peripherals */)>& value) {
|
|
499
|
+
inline std::optional<std::function<void(const std::vector<BLEDevice>& /* peripherals */)>> create_std__optional_std__function_void_const_std__vector_BLEDevice______peripherals______(const std::function<void(const std::vector<BLEDevice>& /* peripherals */)>& value) noexcept {
|
|
475
500
|
return std::optional<std::function<void(const std::vector<BLEDevice>& /* peripherals */)>>(value);
|
|
476
501
|
}
|
|
502
|
+
inline bool has_value_std__optional_std__function_void_const_std__vector_BLEDevice______peripherals______(const std::optional<std::function<void(const std::vector<BLEDevice>& /* peripherals */)>>& optional) noexcept {
|
|
503
|
+
return optional.has_value();
|
|
504
|
+
}
|
|
505
|
+
inline std::function<void(const std::vector<BLEDevice>& /* peripherals */)> get_std__optional_std__function_void_const_std__vector_BLEDevice______peripherals______(const std::optional<std::function<void(const std::vector<BLEDevice>& /* peripherals */)>>& optional) noexcept {
|
|
506
|
+
return *optional;
|
|
507
|
+
}
|
|
477
508
|
|
|
478
509
|
// pragma MARK: std::shared_ptr<HybridNativeBleNitroFactorySpec>
|
|
479
510
|
/**
|
|
480
511
|
* Specialized version of `std::shared_ptr<HybridNativeBleNitroFactorySpec>`.
|
|
481
512
|
*/
|
|
482
513
|
using std__shared_ptr_HybridNativeBleNitroFactorySpec_ = std::shared_ptr<HybridNativeBleNitroFactorySpec>;
|
|
483
|
-
std::shared_ptr<HybridNativeBleNitroFactorySpec> create_std__shared_ptr_HybridNativeBleNitroFactorySpec_(void*
|
|
484
|
-
void*
|
|
514
|
+
std::shared_ptr<HybridNativeBleNitroFactorySpec> create_std__shared_ptr_HybridNativeBleNitroFactorySpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
515
|
+
void* NON_NULL get_std__shared_ptr_HybridNativeBleNitroFactorySpec_(std__shared_ptr_HybridNativeBleNitroFactorySpec_ cppType);
|
|
485
516
|
|
|
486
517
|
// pragma MARK: std::weak_ptr<HybridNativeBleNitroFactorySpec>
|
|
487
518
|
using std__weak_ptr_HybridNativeBleNitroFactorySpec_ = std::weak_ptr<HybridNativeBleNitroFactorySpec>;
|
|
488
|
-
inline std__weak_ptr_HybridNativeBleNitroFactorySpec_ weakify_std__shared_ptr_HybridNativeBleNitroFactorySpec_(const std::shared_ptr<HybridNativeBleNitroFactorySpec>& strong) { return strong; }
|
|
519
|
+
inline std__weak_ptr_HybridNativeBleNitroFactorySpec_ weakify_std__shared_ptr_HybridNativeBleNitroFactorySpec_(const std::shared_ptr<HybridNativeBleNitroFactorySpec>& strong) noexcept { return strong; }
|
|
489
520
|
|
|
490
521
|
// pragma MARK: Result<std::shared_ptr<HybridNativeBleNitroSpec>>
|
|
491
522
|
using Result_std__shared_ptr_HybridNativeBleNitroSpec__ = Result<std::shared_ptr<HybridNativeBleNitroSpec>>;
|
|
492
|
-
inline Result_std__shared_ptr_HybridNativeBleNitroSpec__ create_Result_std__shared_ptr_HybridNativeBleNitroSpec__(const std::shared_ptr<HybridNativeBleNitroSpec>& value) {
|
|
523
|
+
inline Result_std__shared_ptr_HybridNativeBleNitroSpec__ create_Result_std__shared_ptr_HybridNativeBleNitroSpec__(const std::shared_ptr<HybridNativeBleNitroSpec>& value) noexcept {
|
|
493
524
|
return Result<std::shared_ptr<HybridNativeBleNitroSpec>>::withValue(value);
|
|
494
525
|
}
|
|
495
|
-
inline Result_std__shared_ptr_HybridNativeBleNitroSpec__ create_Result_std__shared_ptr_HybridNativeBleNitroSpec__(const std::exception_ptr& error) {
|
|
526
|
+
inline Result_std__shared_ptr_HybridNativeBleNitroSpec__ create_Result_std__shared_ptr_HybridNativeBleNitroSpec__(const std::exception_ptr& error) noexcept {
|
|
496
527
|
return Result<std::shared_ptr<HybridNativeBleNitroSpec>>::withError(error);
|
|
497
528
|
}
|
|
498
529
|
|