munim-bluetooth 0.2.8 → 0.3.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/lib/typescript/src/specs/munim-bluetooth.nitro.d.ts +24 -25
- package/lib/typescript/src/specs/munim-bluetooth.nitro.d.ts.map +1 -1
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/MunimBluetooth+autolinking.cmake +81 -0
- package/nitrogen/generated/android/MunimBluetooth+autolinking.gradle +27 -0
- package/nitrogen/generated/android/MunimBluetoothOnLoad.cpp +44 -0
- package/nitrogen/generated/android/MunimBluetoothOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JAdvertisingDataTypes.hpp +345 -0
- package/nitrogen/generated/android/c++/JAdvertisingOptions.hpp +93 -0
- package/nitrogen/generated/android/c++/JCharacteristicValue.hpp +65 -0
- package/nitrogen/generated/android/c++/JGATTCharacteristic.hpp +85 -0
- package/nitrogen/generated/android/c++/JGATTService.hpp +83 -0
- package/nitrogen/generated/android/c++/JHybridMunimBluetoothSpec.cpp +307 -0
- package/nitrogen/generated/android/c++/JHybridMunimBluetoothSpec.hpp +85 -0
- package/nitrogen/generated/android/c++/JScanMode.hpp +61 -0
- package/nitrogen/generated/android/c++/JScanOptions.hpp +87 -0
- package/nitrogen/generated/android/c++/JServiceDataEntry.hpp +61 -0
- package/nitrogen/generated/android/c++/JWriteType.hpp +58 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/AdvertisingDataTypes.kt +89 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/AdvertisingOptions.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/CharacteristicValue.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/GATTCharacteristic.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/GATTService.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/HybridMunimBluetoothSpec.kt +134 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MunimBluetoothOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ScanMode.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ScanOptions.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ServiceDataEntry.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/WriteType.kt +23 -0
- package/nitrogen/generated/ios/MunimBluetooth+autolinking.rb +60 -0
- package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Bridge.cpp +97 -0
- package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Bridge.hpp +583 -0
- package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Umbrella.hpp +74 -0
- package/nitrogen/generated/ios/MunimBluetoothAutolinking.mm +33 -0
- package/nitrogen/generated/ios/MunimBluetoothAutolinking.swift +44 -0
- package/nitrogen/generated/ios/c++/HybridMunimBluetoothSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridMunimBluetoothSpecSwift.hpp +241 -0
- package/nitrogen/generated/ios/swift/AdvertisingDataTypes.swift +400 -0
- package/nitrogen/generated/ios/swift/AdvertisingOptions.swift +83 -0
- package/nitrogen/generated/ios/swift/CharacteristicValue.swift +40 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_AdvertisingDataTypes.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_CharacteristicValue.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_GATTService_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift +47 -0
- package/nitrogen/generated/ios/swift/GATTCharacteristic.swift +59 -0
- package/nitrogen/generated/ios/swift/GATTService.swift +41 -0
- package/nitrogen/generated/ios/swift/HybridMunimBluetoothSpec.swift +75 -0
- package/nitrogen/generated/ios/swift/HybridMunimBluetoothSpec_cxx.swift +431 -0
- package/nitrogen/generated/ios/swift/ScanMode.swift +44 -0
- package/nitrogen/generated/ios/swift/ScanOptions.swift +78 -0
- package/nitrogen/generated/ios/swift/ServiceDataEntry.swift +35 -0
- package/nitrogen/generated/ios/swift/WriteType.swift +40 -0
- package/nitrogen/generated/shared/c++/AdvertisingDataTypes.hpp +155 -0
- package/nitrogen/generated/shared/c++/AdvertisingOptions.hpp +99 -0
- package/nitrogen/generated/shared/c++/CharacteristicValue.hpp +91 -0
- package/nitrogen/generated/shared/c++/GATTCharacteristic.hpp +93 -0
- package/nitrogen/generated/shared/c++/GATTService.hpp +90 -0
- package/nitrogen/generated/shared/c++/HybridMunimBluetoothSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridMunimBluetoothSpec.hpp +101 -0
- package/nitrogen/generated/shared/c++/ScanMode.hpp +80 -0
- package/nitrogen/generated/shared/c++/ScanOptions.hpp +95 -0
- package/nitrogen/generated/shared/c++/ServiceDataEntry.hpp +87 -0
- package/nitrogen/generated/shared/c++/WriteType.hpp +76 -0
- package/package.json +9 -9
- package/src/specs/munim-bluetooth.nitro.ts +34 -25
- package/lib/module/package.json +0 -1
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// MunimBluetooth-Swift-Cxx-Bridge.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
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `AdvertisingDataTypes` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::munimbluetooth { struct AdvertisingDataTypes; }
|
|
13
|
+
// Forward declaration of `CharacteristicValue` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::munimbluetooth { struct CharacteristicValue; }
|
|
15
|
+
// Forward declaration of `GATTCharacteristic` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::munimbluetooth { struct GATTCharacteristic; }
|
|
17
|
+
// Forward declaration of `GATTService` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::munimbluetooth { struct GATTService; }
|
|
19
|
+
// Forward declaration of `HybridMunimBluetoothSpec` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::munimbluetooth { class HybridMunimBluetoothSpec; }
|
|
21
|
+
// Forward declaration of `ScanMode` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::munimbluetooth { enum class ScanMode; }
|
|
23
|
+
// Forward declaration of `ScanOptions` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::munimbluetooth { struct ScanOptions; }
|
|
25
|
+
// Forward declaration of `ServiceDataEntry` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::munimbluetooth { struct ServiceDataEntry; }
|
|
27
|
+
// Forward declaration of `WriteType` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::munimbluetooth { enum class WriteType; }
|
|
29
|
+
|
|
30
|
+
// Forward declarations of Swift defined types
|
|
31
|
+
// Forward declaration of `HybridMunimBluetoothSpec_cxx` to properly resolve imports.
|
|
32
|
+
namespace MunimBluetooth { class HybridMunimBluetoothSpec_cxx; }
|
|
33
|
+
|
|
34
|
+
// Include C++ defined types
|
|
35
|
+
#include "AdvertisingDataTypes.hpp"
|
|
36
|
+
#include "CharacteristicValue.hpp"
|
|
37
|
+
#include "GATTCharacteristic.hpp"
|
|
38
|
+
#include "GATTService.hpp"
|
|
39
|
+
#include "HybridMunimBluetoothSpec.hpp"
|
|
40
|
+
#include "ScanMode.hpp"
|
|
41
|
+
#include "ScanOptions.hpp"
|
|
42
|
+
#include "ServiceDataEntry.hpp"
|
|
43
|
+
#include "WriteType.hpp"
|
|
44
|
+
#include <NitroModules/Promise.hpp>
|
|
45
|
+
#include <NitroModules/PromiseHolder.hpp>
|
|
46
|
+
#include <NitroModules/Result.hpp>
|
|
47
|
+
#include <exception>
|
|
48
|
+
#include <functional>
|
|
49
|
+
#include <memory>
|
|
50
|
+
#include <optional>
|
|
51
|
+
#include <string>
|
|
52
|
+
#include <vector>
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Contains specialized versions of C++ templated types so they can be accessed from Swift,
|
|
56
|
+
* as well as helper functions to interact with those C++ types from Swift.
|
|
57
|
+
*/
|
|
58
|
+
namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
59
|
+
|
|
60
|
+
// pragma MARK: std::vector<std::string>
|
|
61
|
+
/**
|
|
62
|
+
* Specialized version of `std::vector<std::string>`.
|
|
63
|
+
*/
|
|
64
|
+
using std__vector_std__string_ = std::vector<std::string>;
|
|
65
|
+
inline std::vector<std::string> create_std__vector_std__string_(size_t size) noexcept {
|
|
66
|
+
std::vector<std::string> vector;
|
|
67
|
+
vector.reserve(size);
|
|
68
|
+
return vector;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// pragma MARK: std::optional<std::string>
|
|
72
|
+
/**
|
|
73
|
+
* Specialized version of `std::optional<std::string>`.
|
|
74
|
+
*/
|
|
75
|
+
using std__optional_std__string_ = std::optional<std::string>;
|
|
76
|
+
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
|
|
77
|
+
return std::optional<std::string>(value);
|
|
78
|
+
}
|
|
79
|
+
inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
80
|
+
return optional.has_value();
|
|
81
|
+
}
|
|
82
|
+
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
83
|
+
return *optional;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// pragma MARK: std::optional<double>
|
|
87
|
+
/**
|
|
88
|
+
* Specialized version of `std::optional<double>`.
|
|
89
|
+
*/
|
|
90
|
+
using std__optional_double_ = std::optional<double>;
|
|
91
|
+
inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
|
|
92
|
+
return std::optional<double>(value);
|
|
93
|
+
}
|
|
94
|
+
inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
95
|
+
return optional.has_value();
|
|
96
|
+
}
|
|
97
|
+
inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
98
|
+
return *optional;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// pragma MARK: std::optional<std::vector<std::string>>
|
|
102
|
+
/**
|
|
103
|
+
* Specialized version of `std::optional<std::vector<std::string>>`.
|
|
104
|
+
*/
|
|
105
|
+
using std__optional_std__vector_std__string__ = std::optional<std::vector<std::string>>;
|
|
106
|
+
inline std::optional<std::vector<std::string>> create_std__optional_std__vector_std__string__(const std::vector<std::string>& value) noexcept {
|
|
107
|
+
return std::optional<std::vector<std::string>>(value);
|
|
108
|
+
}
|
|
109
|
+
inline bool has_value_std__optional_std__vector_std__string__(const std::optional<std::vector<std::string>>& optional) noexcept {
|
|
110
|
+
return optional.has_value();
|
|
111
|
+
}
|
|
112
|
+
inline std::vector<std::string> get_std__optional_std__vector_std__string__(const std::optional<std::vector<std::string>>& optional) noexcept {
|
|
113
|
+
return *optional;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// pragma MARK: std::vector<ServiceDataEntry>
|
|
117
|
+
/**
|
|
118
|
+
* Specialized version of `std::vector<ServiceDataEntry>`.
|
|
119
|
+
*/
|
|
120
|
+
using std__vector_ServiceDataEntry_ = std::vector<ServiceDataEntry>;
|
|
121
|
+
inline std::vector<ServiceDataEntry> create_std__vector_ServiceDataEntry_(size_t size) noexcept {
|
|
122
|
+
std::vector<ServiceDataEntry> vector;
|
|
123
|
+
vector.reserve(size);
|
|
124
|
+
return vector;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// pragma MARK: std::optional<std::vector<ServiceDataEntry>>
|
|
128
|
+
/**
|
|
129
|
+
* Specialized version of `std::optional<std::vector<ServiceDataEntry>>`.
|
|
130
|
+
*/
|
|
131
|
+
using std__optional_std__vector_ServiceDataEntry__ = std::optional<std::vector<ServiceDataEntry>>;
|
|
132
|
+
inline std::optional<std::vector<ServiceDataEntry>> create_std__optional_std__vector_ServiceDataEntry__(const std::vector<ServiceDataEntry>& value) noexcept {
|
|
133
|
+
return std::optional<std::vector<ServiceDataEntry>>(value);
|
|
134
|
+
}
|
|
135
|
+
inline bool has_value_std__optional_std__vector_ServiceDataEntry__(const std::optional<std::vector<ServiceDataEntry>>& optional) noexcept {
|
|
136
|
+
return optional.has_value();
|
|
137
|
+
}
|
|
138
|
+
inline std::vector<ServiceDataEntry> get_std__optional_std__vector_ServiceDataEntry__(const std::optional<std::vector<ServiceDataEntry>>& optional) noexcept {
|
|
139
|
+
return *optional;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// pragma MARK: std::optional<AdvertisingDataTypes>
|
|
143
|
+
/**
|
|
144
|
+
* Specialized version of `std::optional<AdvertisingDataTypes>`.
|
|
145
|
+
*/
|
|
146
|
+
using std__optional_AdvertisingDataTypes_ = std::optional<AdvertisingDataTypes>;
|
|
147
|
+
inline std::optional<AdvertisingDataTypes> create_std__optional_AdvertisingDataTypes_(const AdvertisingDataTypes& value) noexcept {
|
|
148
|
+
return std::optional<AdvertisingDataTypes>(value);
|
|
149
|
+
}
|
|
150
|
+
inline bool has_value_std__optional_AdvertisingDataTypes_(const std::optional<AdvertisingDataTypes>& optional) noexcept {
|
|
151
|
+
return optional.has_value();
|
|
152
|
+
}
|
|
153
|
+
inline AdvertisingDataTypes get_std__optional_AdvertisingDataTypes_(const std::optional<AdvertisingDataTypes>& optional) noexcept {
|
|
154
|
+
return *optional;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// pragma MARK: std::shared_ptr<Promise<AdvertisingDataTypes>>
|
|
158
|
+
/**
|
|
159
|
+
* Specialized version of `std::shared_ptr<Promise<AdvertisingDataTypes>>`.
|
|
160
|
+
*/
|
|
161
|
+
using std__shared_ptr_Promise_AdvertisingDataTypes__ = std::shared_ptr<Promise<AdvertisingDataTypes>>;
|
|
162
|
+
inline std::shared_ptr<Promise<AdvertisingDataTypes>> create_std__shared_ptr_Promise_AdvertisingDataTypes__() noexcept {
|
|
163
|
+
return Promise<AdvertisingDataTypes>::create();
|
|
164
|
+
}
|
|
165
|
+
inline PromiseHolder<AdvertisingDataTypes> wrap_std__shared_ptr_Promise_AdvertisingDataTypes__(std::shared_ptr<Promise<AdvertisingDataTypes>> promise) noexcept {
|
|
166
|
+
return PromiseHolder<AdvertisingDataTypes>(std::move(promise));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// pragma MARK: std::function<void(const AdvertisingDataTypes& /* result */)>
|
|
170
|
+
/**
|
|
171
|
+
* Specialized version of `std::function<void(const AdvertisingDataTypes&)>`.
|
|
172
|
+
*/
|
|
173
|
+
using Func_void_AdvertisingDataTypes = std::function<void(const AdvertisingDataTypes& /* result */)>;
|
|
174
|
+
/**
|
|
175
|
+
* Wrapper class for a `std::function<void(const AdvertisingDataTypes& / * result * /)>`, this can be used from Swift.
|
|
176
|
+
*/
|
|
177
|
+
class Func_void_AdvertisingDataTypes_Wrapper final {
|
|
178
|
+
public:
|
|
179
|
+
explicit Func_void_AdvertisingDataTypes_Wrapper(std::function<void(const AdvertisingDataTypes& /* result */)>&& func): _function(std::make_unique<std::function<void(const AdvertisingDataTypes& /* result */)>>(std::move(func))) {}
|
|
180
|
+
inline void call(AdvertisingDataTypes result) const noexcept {
|
|
181
|
+
_function->operator()(result);
|
|
182
|
+
}
|
|
183
|
+
private:
|
|
184
|
+
std::unique_ptr<std::function<void(const AdvertisingDataTypes& /* result */)>> _function;
|
|
185
|
+
} SWIFT_NONCOPYABLE;
|
|
186
|
+
Func_void_AdvertisingDataTypes create_Func_void_AdvertisingDataTypes(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
187
|
+
inline Func_void_AdvertisingDataTypes_Wrapper wrap_Func_void_AdvertisingDataTypes(Func_void_AdvertisingDataTypes value) noexcept {
|
|
188
|
+
return Func_void_AdvertisingDataTypes_Wrapper(std::move(value));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
192
|
+
/**
|
|
193
|
+
* Specialized version of `std::function<void(const std::exception_ptr&)>`.
|
|
194
|
+
*/
|
|
195
|
+
using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
|
|
196
|
+
/**
|
|
197
|
+
* Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
|
|
198
|
+
*/
|
|
199
|
+
class Func_void_std__exception_ptr_Wrapper final {
|
|
200
|
+
public:
|
|
201
|
+
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))) {}
|
|
202
|
+
inline void call(std::exception_ptr error) const noexcept {
|
|
203
|
+
_function->operator()(error);
|
|
204
|
+
}
|
|
205
|
+
private:
|
|
206
|
+
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
207
|
+
} SWIFT_NONCOPYABLE;
|
|
208
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
209
|
+
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
|
|
210
|
+
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// pragma MARK: std::vector<GATTCharacteristic>
|
|
214
|
+
/**
|
|
215
|
+
* Specialized version of `std::vector<GATTCharacteristic>`.
|
|
216
|
+
*/
|
|
217
|
+
using std__vector_GATTCharacteristic_ = std::vector<GATTCharacteristic>;
|
|
218
|
+
inline std::vector<GATTCharacteristic> create_std__vector_GATTCharacteristic_(size_t size) noexcept {
|
|
219
|
+
std::vector<GATTCharacteristic> vector;
|
|
220
|
+
vector.reserve(size);
|
|
221
|
+
return vector;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// pragma MARK: std::vector<GATTService>
|
|
225
|
+
/**
|
|
226
|
+
* Specialized version of `std::vector<GATTService>`.
|
|
227
|
+
*/
|
|
228
|
+
using std__vector_GATTService_ = std::vector<GATTService>;
|
|
229
|
+
inline std::vector<GATTService> create_std__vector_GATTService_(size_t size) noexcept {
|
|
230
|
+
std::vector<GATTService> vector;
|
|
231
|
+
vector.reserve(size);
|
|
232
|
+
return vector;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// pragma MARK: std::shared_ptr<Promise<bool>>
|
|
236
|
+
/**
|
|
237
|
+
* Specialized version of `std::shared_ptr<Promise<bool>>`.
|
|
238
|
+
*/
|
|
239
|
+
using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
|
|
240
|
+
inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
|
|
241
|
+
return Promise<bool>::create();
|
|
242
|
+
}
|
|
243
|
+
inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
|
|
244
|
+
return PromiseHolder<bool>(std::move(promise));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// pragma MARK: std::function<void(bool /* result */)>
|
|
248
|
+
/**
|
|
249
|
+
* Specialized version of `std::function<void(bool)>`.
|
|
250
|
+
*/
|
|
251
|
+
using Func_void_bool = std::function<void(bool /* result */)>;
|
|
252
|
+
/**
|
|
253
|
+
* Wrapper class for a `std::function<void(bool / * result * /)>`, this can be used from Swift.
|
|
254
|
+
*/
|
|
255
|
+
class Func_void_bool_Wrapper final {
|
|
256
|
+
public:
|
|
257
|
+
explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
|
|
258
|
+
inline void call(bool result) const noexcept {
|
|
259
|
+
_function->operator()(result);
|
|
260
|
+
}
|
|
261
|
+
private:
|
|
262
|
+
std::unique_ptr<std::function<void(bool /* result */)>> _function;
|
|
263
|
+
} SWIFT_NONCOPYABLE;
|
|
264
|
+
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
265
|
+
inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
|
|
266
|
+
return Func_void_bool_Wrapper(std::move(value));
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// pragma MARK: std::optional<bool>
|
|
270
|
+
/**
|
|
271
|
+
* Specialized version of `std::optional<bool>`.
|
|
272
|
+
*/
|
|
273
|
+
using std__optional_bool_ = std::optional<bool>;
|
|
274
|
+
inline std::optional<bool> create_std__optional_bool_(const bool& value) noexcept {
|
|
275
|
+
return std::optional<bool>(value);
|
|
276
|
+
}
|
|
277
|
+
inline bool has_value_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
278
|
+
return optional.has_value();
|
|
279
|
+
}
|
|
280
|
+
inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
281
|
+
return *optional;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// pragma MARK: std::optional<ScanMode>
|
|
285
|
+
/**
|
|
286
|
+
* Specialized version of `std::optional<ScanMode>`.
|
|
287
|
+
*/
|
|
288
|
+
using std__optional_ScanMode_ = std::optional<ScanMode>;
|
|
289
|
+
inline std::optional<ScanMode> create_std__optional_ScanMode_(const ScanMode& value) noexcept {
|
|
290
|
+
return std::optional<ScanMode>(value);
|
|
291
|
+
}
|
|
292
|
+
inline bool has_value_std__optional_ScanMode_(const std::optional<ScanMode>& optional) noexcept {
|
|
293
|
+
return optional.has_value();
|
|
294
|
+
}
|
|
295
|
+
inline ScanMode get_std__optional_ScanMode_(const std::optional<ScanMode>& optional) noexcept {
|
|
296
|
+
return *optional;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// pragma MARK: std::optional<ScanOptions>
|
|
300
|
+
/**
|
|
301
|
+
* Specialized version of `std::optional<ScanOptions>`.
|
|
302
|
+
*/
|
|
303
|
+
using std__optional_ScanOptions_ = std::optional<ScanOptions>;
|
|
304
|
+
inline std::optional<ScanOptions> create_std__optional_ScanOptions_(const ScanOptions& value) noexcept {
|
|
305
|
+
return std::optional<ScanOptions>(value);
|
|
306
|
+
}
|
|
307
|
+
inline bool has_value_std__optional_ScanOptions_(const std::optional<ScanOptions>& optional) noexcept {
|
|
308
|
+
return optional.has_value();
|
|
309
|
+
}
|
|
310
|
+
inline ScanOptions get_std__optional_ScanOptions_(const std::optional<ScanOptions>& optional) noexcept {
|
|
311
|
+
return *optional;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// pragma MARK: std::shared_ptr<Promise<void>>
|
|
315
|
+
/**
|
|
316
|
+
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
317
|
+
*/
|
|
318
|
+
using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
|
|
319
|
+
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
|
|
320
|
+
return Promise<void>::create();
|
|
321
|
+
}
|
|
322
|
+
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
|
|
323
|
+
return PromiseHolder<void>(std::move(promise));
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// pragma MARK: std::function<void()>
|
|
327
|
+
/**
|
|
328
|
+
* Specialized version of `std::function<void()>`.
|
|
329
|
+
*/
|
|
330
|
+
using Func_void = std::function<void()>;
|
|
331
|
+
/**
|
|
332
|
+
* Wrapper class for a `std::function<void()>`, this can be used from Swift.
|
|
333
|
+
*/
|
|
334
|
+
class Func_void_Wrapper final {
|
|
335
|
+
public:
|
|
336
|
+
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
|
|
337
|
+
inline void call() const noexcept {
|
|
338
|
+
_function->operator()();
|
|
339
|
+
}
|
|
340
|
+
private:
|
|
341
|
+
std::unique_ptr<std::function<void()>> _function;
|
|
342
|
+
} SWIFT_NONCOPYABLE;
|
|
343
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
344
|
+
inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
|
|
345
|
+
return Func_void_Wrapper(std::move(value));
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// pragma MARK: std::shared_ptr<Promise<std::vector<GATTService>>>
|
|
349
|
+
/**
|
|
350
|
+
* Specialized version of `std::shared_ptr<Promise<std::vector<GATTService>>>`.
|
|
351
|
+
*/
|
|
352
|
+
using std__shared_ptr_Promise_std__vector_GATTService___ = std::shared_ptr<Promise<std::vector<GATTService>>>;
|
|
353
|
+
inline std::shared_ptr<Promise<std::vector<GATTService>>> create_std__shared_ptr_Promise_std__vector_GATTService___() noexcept {
|
|
354
|
+
return Promise<std::vector<GATTService>>::create();
|
|
355
|
+
}
|
|
356
|
+
inline PromiseHolder<std::vector<GATTService>> wrap_std__shared_ptr_Promise_std__vector_GATTService___(std::shared_ptr<Promise<std::vector<GATTService>>> promise) noexcept {
|
|
357
|
+
return PromiseHolder<std::vector<GATTService>>(std::move(promise));
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// pragma MARK: std::function<void(const std::vector<GATTService>& /* result */)>
|
|
361
|
+
/**
|
|
362
|
+
* Specialized version of `std::function<void(const std::vector<GATTService>&)>`.
|
|
363
|
+
*/
|
|
364
|
+
using Func_void_std__vector_GATTService_ = std::function<void(const std::vector<GATTService>& /* result */)>;
|
|
365
|
+
/**
|
|
366
|
+
* Wrapper class for a `std::function<void(const std::vector<GATTService>& / * result * /)>`, this can be used from Swift.
|
|
367
|
+
*/
|
|
368
|
+
class Func_void_std__vector_GATTService__Wrapper final {
|
|
369
|
+
public:
|
|
370
|
+
explicit Func_void_std__vector_GATTService__Wrapper(std::function<void(const std::vector<GATTService>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<GATTService>& /* result */)>>(std::move(func))) {}
|
|
371
|
+
inline void call(std::vector<GATTService> result) const noexcept {
|
|
372
|
+
_function->operator()(result);
|
|
373
|
+
}
|
|
374
|
+
private:
|
|
375
|
+
std::unique_ptr<std::function<void(const std::vector<GATTService>& /* result */)>> _function;
|
|
376
|
+
} SWIFT_NONCOPYABLE;
|
|
377
|
+
Func_void_std__vector_GATTService_ create_Func_void_std__vector_GATTService_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
378
|
+
inline Func_void_std__vector_GATTService__Wrapper wrap_Func_void_std__vector_GATTService_(Func_void_std__vector_GATTService_ value) noexcept {
|
|
379
|
+
return Func_void_std__vector_GATTService__Wrapper(std::move(value));
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// pragma MARK: std::shared_ptr<Promise<CharacteristicValue>>
|
|
383
|
+
/**
|
|
384
|
+
* Specialized version of `std::shared_ptr<Promise<CharacteristicValue>>`.
|
|
385
|
+
*/
|
|
386
|
+
using std__shared_ptr_Promise_CharacteristicValue__ = std::shared_ptr<Promise<CharacteristicValue>>;
|
|
387
|
+
inline std::shared_ptr<Promise<CharacteristicValue>> create_std__shared_ptr_Promise_CharacteristicValue__() noexcept {
|
|
388
|
+
return Promise<CharacteristicValue>::create();
|
|
389
|
+
}
|
|
390
|
+
inline PromiseHolder<CharacteristicValue> wrap_std__shared_ptr_Promise_CharacteristicValue__(std::shared_ptr<Promise<CharacteristicValue>> promise) noexcept {
|
|
391
|
+
return PromiseHolder<CharacteristicValue>(std::move(promise));
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// pragma MARK: std::function<void(const CharacteristicValue& /* result */)>
|
|
395
|
+
/**
|
|
396
|
+
* Specialized version of `std::function<void(const CharacteristicValue&)>`.
|
|
397
|
+
*/
|
|
398
|
+
using Func_void_CharacteristicValue = std::function<void(const CharacteristicValue& /* result */)>;
|
|
399
|
+
/**
|
|
400
|
+
* Wrapper class for a `std::function<void(const CharacteristicValue& / * result * /)>`, this can be used from Swift.
|
|
401
|
+
*/
|
|
402
|
+
class Func_void_CharacteristicValue_Wrapper final {
|
|
403
|
+
public:
|
|
404
|
+
explicit Func_void_CharacteristicValue_Wrapper(std::function<void(const CharacteristicValue& /* result */)>&& func): _function(std::make_unique<std::function<void(const CharacteristicValue& /* result */)>>(std::move(func))) {}
|
|
405
|
+
inline void call(CharacteristicValue result) const noexcept {
|
|
406
|
+
_function->operator()(result);
|
|
407
|
+
}
|
|
408
|
+
private:
|
|
409
|
+
std::unique_ptr<std::function<void(const CharacteristicValue& /* result */)>> _function;
|
|
410
|
+
} SWIFT_NONCOPYABLE;
|
|
411
|
+
Func_void_CharacteristicValue create_Func_void_CharacteristicValue(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
412
|
+
inline Func_void_CharacteristicValue_Wrapper wrap_Func_void_CharacteristicValue(Func_void_CharacteristicValue value) noexcept {
|
|
413
|
+
return Func_void_CharacteristicValue_Wrapper(std::move(value));
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// pragma MARK: std::optional<WriteType>
|
|
417
|
+
/**
|
|
418
|
+
* Specialized version of `std::optional<WriteType>`.
|
|
419
|
+
*/
|
|
420
|
+
using std__optional_WriteType_ = std::optional<WriteType>;
|
|
421
|
+
inline std::optional<WriteType> create_std__optional_WriteType_(const WriteType& value) noexcept {
|
|
422
|
+
return std::optional<WriteType>(value);
|
|
423
|
+
}
|
|
424
|
+
inline bool has_value_std__optional_WriteType_(const std::optional<WriteType>& optional) noexcept {
|
|
425
|
+
return optional.has_value();
|
|
426
|
+
}
|
|
427
|
+
inline WriteType get_std__optional_WriteType_(const std::optional<WriteType>& optional) noexcept {
|
|
428
|
+
return *optional;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// pragma MARK: std::shared_ptr<Promise<std::vector<std::string>>>
|
|
432
|
+
/**
|
|
433
|
+
* Specialized version of `std::shared_ptr<Promise<std::vector<std::string>>>`.
|
|
434
|
+
*/
|
|
435
|
+
using std__shared_ptr_Promise_std__vector_std__string___ = std::shared_ptr<Promise<std::vector<std::string>>>;
|
|
436
|
+
inline std::shared_ptr<Promise<std::vector<std::string>>> create_std__shared_ptr_Promise_std__vector_std__string___() noexcept {
|
|
437
|
+
return Promise<std::vector<std::string>>::create();
|
|
438
|
+
}
|
|
439
|
+
inline PromiseHolder<std::vector<std::string>> wrap_std__shared_ptr_Promise_std__vector_std__string___(std::shared_ptr<Promise<std::vector<std::string>>> promise) noexcept {
|
|
440
|
+
return PromiseHolder<std::vector<std::string>>(std::move(promise));
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
// pragma MARK: std::function<void(const std::vector<std::string>& /* result */)>
|
|
444
|
+
/**
|
|
445
|
+
* Specialized version of `std::function<void(const std::vector<std::string>&)>`.
|
|
446
|
+
*/
|
|
447
|
+
using Func_void_std__vector_std__string_ = std::function<void(const std::vector<std::string>& /* result */)>;
|
|
448
|
+
/**
|
|
449
|
+
* Wrapper class for a `std::function<void(const std::vector<std::string>& / * result * /)>`, this can be used from Swift.
|
|
450
|
+
*/
|
|
451
|
+
class Func_void_std__vector_std__string__Wrapper final {
|
|
452
|
+
public:
|
|
453
|
+
explicit Func_void_std__vector_std__string__Wrapper(std::function<void(const std::vector<std::string>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<std::string>& /* result */)>>(std::move(func))) {}
|
|
454
|
+
inline void call(std::vector<std::string> result) const noexcept {
|
|
455
|
+
_function->operator()(result);
|
|
456
|
+
}
|
|
457
|
+
private:
|
|
458
|
+
std::unique_ptr<std::function<void(const std::vector<std::string>& /* result */)>> _function;
|
|
459
|
+
} SWIFT_NONCOPYABLE;
|
|
460
|
+
Func_void_std__vector_std__string_ create_Func_void_std__vector_std__string_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
461
|
+
inline Func_void_std__vector_std__string__Wrapper wrap_Func_void_std__vector_std__string_(Func_void_std__vector_std__string_ value) noexcept {
|
|
462
|
+
return Func_void_std__vector_std__string__Wrapper(std::move(value));
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// pragma MARK: std::shared_ptr<Promise<double>>
|
|
466
|
+
/**
|
|
467
|
+
* Specialized version of `std::shared_ptr<Promise<double>>`.
|
|
468
|
+
*/
|
|
469
|
+
using std__shared_ptr_Promise_double__ = std::shared_ptr<Promise<double>>;
|
|
470
|
+
inline std::shared_ptr<Promise<double>> create_std__shared_ptr_Promise_double__() noexcept {
|
|
471
|
+
return Promise<double>::create();
|
|
472
|
+
}
|
|
473
|
+
inline PromiseHolder<double> wrap_std__shared_ptr_Promise_double__(std::shared_ptr<Promise<double>> promise) noexcept {
|
|
474
|
+
return PromiseHolder<double>(std::move(promise));
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// pragma MARK: std::function<void(double /* result */)>
|
|
478
|
+
/**
|
|
479
|
+
* Specialized version of `std::function<void(double)>`.
|
|
480
|
+
*/
|
|
481
|
+
using Func_void_double = std::function<void(double /* result */)>;
|
|
482
|
+
/**
|
|
483
|
+
* Wrapper class for a `std::function<void(double / * result * /)>`, this can be used from Swift.
|
|
484
|
+
*/
|
|
485
|
+
class Func_void_double_Wrapper final {
|
|
486
|
+
public:
|
|
487
|
+
explicit Func_void_double_Wrapper(std::function<void(double /* result */)>&& func): _function(std::make_unique<std::function<void(double /* result */)>>(std::move(func))) {}
|
|
488
|
+
inline void call(double result) const noexcept {
|
|
489
|
+
_function->operator()(result);
|
|
490
|
+
}
|
|
491
|
+
private:
|
|
492
|
+
std::unique_ptr<std::function<void(double /* result */)>> _function;
|
|
493
|
+
} SWIFT_NONCOPYABLE;
|
|
494
|
+
Func_void_double create_Func_void_double(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
495
|
+
inline Func_void_double_Wrapper wrap_Func_void_double(Func_void_double value) noexcept {
|
|
496
|
+
return Func_void_double_Wrapper(std::move(value));
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
// pragma MARK: std::shared_ptr<HybridMunimBluetoothSpec>
|
|
500
|
+
/**
|
|
501
|
+
* Specialized version of `std::shared_ptr<HybridMunimBluetoothSpec>`.
|
|
502
|
+
*/
|
|
503
|
+
using std__shared_ptr_HybridMunimBluetoothSpec_ = std::shared_ptr<HybridMunimBluetoothSpec>;
|
|
504
|
+
std::shared_ptr<HybridMunimBluetoothSpec> create_std__shared_ptr_HybridMunimBluetoothSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
505
|
+
void* NON_NULL get_std__shared_ptr_HybridMunimBluetoothSpec_(std__shared_ptr_HybridMunimBluetoothSpec_ cppType);
|
|
506
|
+
|
|
507
|
+
// pragma MARK: std::weak_ptr<HybridMunimBluetoothSpec>
|
|
508
|
+
using std__weak_ptr_HybridMunimBluetoothSpec_ = std::weak_ptr<HybridMunimBluetoothSpec>;
|
|
509
|
+
inline std__weak_ptr_HybridMunimBluetoothSpec_ weakify_std__shared_ptr_HybridMunimBluetoothSpec_(const std::shared_ptr<HybridMunimBluetoothSpec>& strong) noexcept { return strong; }
|
|
510
|
+
|
|
511
|
+
// pragma MARK: Result<void>
|
|
512
|
+
using Result_void_ = Result<void>;
|
|
513
|
+
inline Result_void_ create_Result_void_() noexcept {
|
|
514
|
+
return Result<void>::withValue();
|
|
515
|
+
}
|
|
516
|
+
inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
|
|
517
|
+
return Result<void>::withError(error);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
// pragma MARK: Result<std::shared_ptr<Promise<AdvertisingDataTypes>>>
|
|
521
|
+
using Result_std__shared_ptr_Promise_AdvertisingDataTypes___ = Result<std::shared_ptr<Promise<AdvertisingDataTypes>>>;
|
|
522
|
+
inline Result_std__shared_ptr_Promise_AdvertisingDataTypes___ create_Result_std__shared_ptr_Promise_AdvertisingDataTypes___(const std::shared_ptr<Promise<AdvertisingDataTypes>>& value) noexcept {
|
|
523
|
+
return Result<std::shared_ptr<Promise<AdvertisingDataTypes>>>::withValue(value);
|
|
524
|
+
}
|
|
525
|
+
inline Result_std__shared_ptr_Promise_AdvertisingDataTypes___ create_Result_std__shared_ptr_Promise_AdvertisingDataTypes___(const std::exception_ptr& error) noexcept {
|
|
526
|
+
return Result<std::shared_ptr<Promise<AdvertisingDataTypes>>>::withError(error);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// pragma MARK: Result<std::shared_ptr<Promise<bool>>>
|
|
530
|
+
using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
|
|
531
|
+
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
|
|
532
|
+
return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
|
|
533
|
+
}
|
|
534
|
+
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
|
|
535
|
+
return Result<std::shared_ptr<Promise<bool>>>::withError(error);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// pragma MARK: Result<std::shared_ptr<Promise<void>>>
|
|
539
|
+
using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
|
|
540
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
|
|
541
|
+
return Result<std::shared_ptr<Promise<void>>>::withValue(value);
|
|
542
|
+
}
|
|
543
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
|
|
544
|
+
return Result<std::shared_ptr<Promise<void>>>::withError(error);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::vector<GATTService>>>>
|
|
548
|
+
using Result_std__shared_ptr_Promise_std__vector_GATTService____ = Result<std::shared_ptr<Promise<std::vector<GATTService>>>>;
|
|
549
|
+
inline Result_std__shared_ptr_Promise_std__vector_GATTService____ create_Result_std__shared_ptr_Promise_std__vector_GATTService____(const std::shared_ptr<Promise<std::vector<GATTService>>>& value) noexcept {
|
|
550
|
+
return Result<std::shared_ptr<Promise<std::vector<GATTService>>>>::withValue(value);
|
|
551
|
+
}
|
|
552
|
+
inline Result_std__shared_ptr_Promise_std__vector_GATTService____ create_Result_std__shared_ptr_Promise_std__vector_GATTService____(const std::exception_ptr& error) noexcept {
|
|
553
|
+
return Result<std::shared_ptr<Promise<std::vector<GATTService>>>>::withError(error);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
// pragma MARK: Result<std::shared_ptr<Promise<CharacteristicValue>>>
|
|
557
|
+
using Result_std__shared_ptr_Promise_CharacteristicValue___ = Result<std::shared_ptr<Promise<CharacteristicValue>>>;
|
|
558
|
+
inline Result_std__shared_ptr_Promise_CharacteristicValue___ create_Result_std__shared_ptr_Promise_CharacteristicValue___(const std::shared_ptr<Promise<CharacteristicValue>>& value) noexcept {
|
|
559
|
+
return Result<std::shared_ptr<Promise<CharacteristicValue>>>::withValue(value);
|
|
560
|
+
}
|
|
561
|
+
inline Result_std__shared_ptr_Promise_CharacteristicValue___ create_Result_std__shared_ptr_Promise_CharacteristicValue___(const std::exception_ptr& error) noexcept {
|
|
562
|
+
return Result<std::shared_ptr<Promise<CharacteristicValue>>>::withError(error);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::vector<std::string>>>>
|
|
566
|
+
using Result_std__shared_ptr_Promise_std__vector_std__string____ = Result<std::shared_ptr<Promise<std::vector<std::string>>>>;
|
|
567
|
+
inline Result_std__shared_ptr_Promise_std__vector_std__string____ create_Result_std__shared_ptr_Promise_std__vector_std__string____(const std::shared_ptr<Promise<std::vector<std::string>>>& value) noexcept {
|
|
568
|
+
return Result<std::shared_ptr<Promise<std::vector<std::string>>>>::withValue(value);
|
|
569
|
+
}
|
|
570
|
+
inline Result_std__shared_ptr_Promise_std__vector_std__string____ create_Result_std__shared_ptr_Promise_std__vector_std__string____(const std::exception_ptr& error) noexcept {
|
|
571
|
+
return Result<std::shared_ptr<Promise<std::vector<std::string>>>>::withError(error);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
// pragma MARK: Result<std::shared_ptr<Promise<double>>>
|
|
575
|
+
using Result_std__shared_ptr_Promise_double___ = Result<std::shared_ptr<Promise<double>>>;
|
|
576
|
+
inline Result_std__shared_ptr_Promise_double___ create_Result_std__shared_ptr_Promise_double___(const std::shared_ptr<Promise<double>>& value) noexcept {
|
|
577
|
+
return Result<std::shared_ptr<Promise<double>>>::withValue(value);
|
|
578
|
+
}
|
|
579
|
+
inline Result_std__shared_ptr_Promise_double___ create_Result_std__shared_ptr_Promise_double___(const std::exception_ptr& error) noexcept {
|
|
580
|
+
return Result<std::shared_ptr<Promise<double>>>::withError(error);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
} // namespace margelo::nitro::munimbluetooth::bridge::swift
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// MunimBluetooth-Swift-Cxx-Umbrella.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
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `AdvertisingDataTypes` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::munimbluetooth { struct AdvertisingDataTypes; }
|
|
13
|
+
// Forward declaration of `AdvertisingOptions` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::munimbluetooth { struct AdvertisingOptions; }
|
|
15
|
+
// Forward declaration of `CharacteristicValue` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::munimbluetooth { struct CharacteristicValue; }
|
|
17
|
+
// Forward declaration of `GATTCharacteristic` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::munimbluetooth { struct GATTCharacteristic; }
|
|
19
|
+
// Forward declaration of `GATTService` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::munimbluetooth { struct GATTService; }
|
|
21
|
+
// Forward declaration of `HybridMunimBluetoothSpec` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::munimbluetooth { class HybridMunimBluetoothSpec; }
|
|
23
|
+
// Forward declaration of `ScanMode` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::munimbluetooth { enum class ScanMode; }
|
|
25
|
+
// Forward declaration of `ScanOptions` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::munimbluetooth { struct ScanOptions; }
|
|
27
|
+
// Forward declaration of `ServiceDataEntry` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::munimbluetooth { struct ServiceDataEntry; }
|
|
29
|
+
// Forward declaration of `WriteType` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::munimbluetooth { enum class WriteType; }
|
|
31
|
+
|
|
32
|
+
// Include C++ defined types
|
|
33
|
+
#include "AdvertisingDataTypes.hpp"
|
|
34
|
+
#include "AdvertisingOptions.hpp"
|
|
35
|
+
#include "CharacteristicValue.hpp"
|
|
36
|
+
#include "GATTCharacteristic.hpp"
|
|
37
|
+
#include "GATTService.hpp"
|
|
38
|
+
#include "HybridMunimBluetoothSpec.hpp"
|
|
39
|
+
#include "ScanMode.hpp"
|
|
40
|
+
#include "ScanOptions.hpp"
|
|
41
|
+
#include "ServiceDataEntry.hpp"
|
|
42
|
+
#include "WriteType.hpp"
|
|
43
|
+
#include <NitroModules/Promise.hpp>
|
|
44
|
+
#include <NitroModules/Result.hpp>
|
|
45
|
+
#include <exception>
|
|
46
|
+
#include <memory>
|
|
47
|
+
#include <optional>
|
|
48
|
+
#include <string>
|
|
49
|
+
#include <vector>
|
|
50
|
+
|
|
51
|
+
// C++ helpers for Swift
|
|
52
|
+
#include "MunimBluetooth-Swift-Cxx-Bridge.hpp"
|
|
53
|
+
|
|
54
|
+
// Common C++ types used in Swift
|
|
55
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
56
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
57
|
+
#include <NitroModules/RuntimeError.hpp>
|
|
58
|
+
#include <NitroModules/DateToChronoDate.hpp>
|
|
59
|
+
|
|
60
|
+
// Forward declarations of Swift defined types
|
|
61
|
+
// Forward declaration of `HybridMunimBluetoothSpec_cxx` to properly resolve imports.
|
|
62
|
+
namespace MunimBluetooth { class HybridMunimBluetoothSpec_cxx; }
|
|
63
|
+
|
|
64
|
+
// Include Swift defined types
|
|
65
|
+
#if __has_include("MunimBluetooth-Swift.h")
|
|
66
|
+
// This header is generated by Xcode/Swift on every app build.
|
|
67
|
+
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "MunimBluetooth".
|
|
68
|
+
#include "MunimBluetooth-Swift.h"
|
|
69
|
+
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
70
|
+
#elif __has_include(<MunimBluetooth/MunimBluetooth-Swift.h>)
|
|
71
|
+
#include <MunimBluetooth/MunimBluetooth-Swift.h>
|
|
72
|
+
#else
|
|
73
|
+
#error MunimBluetooth's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "MunimBluetooth", and try building the app first.
|
|
74
|
+
#endif
|