munim-bluetooth 0.3.27 → 0.4.1
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/CHANGELOG.md +27 -0
- package/LICENSE +201 -21
- package/README.md +480 -75
- package/android/gradle.properties +2 -2
- package/android/src/main/AndroidManifest.xml +3 -1
- package/android/src/main/cpp/cpp-adapter.cpp +4 -1
- package/android/src/main/java/com/munimbluetooth/HybridMunimBluetooth.kt +2006 -209
- package/android/src/main/java/com/munimbluetooth/MunimBluetoothBackgroundService.kt +561 -53
- package/app.plugin.js +155 -0
- package/ios/HybridMunimBluetooth.swift +2123 -298
- package/ios/MunimBluetoothEventEmitter.swift +68 -8
- package/lib/commonjs/index.js +272 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +243 -11
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/index.d.ts +310 -7
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/munim-bluetooth.nitro.d.ts +219 -5
- package/lib/typescript/src/specs/munim-bluetooth.nitro.d.ts.map +1 -1
- package/nitro.json +9 -3
- package/nitrogen/generated/android/c++/JAdvertisingDataTypes.hpp +96 -96
- package/nitrogen/generated/android/c++/JAdvertisingOptions.hpp +8 -8
- package/nitrogen/generated/android/c++/JBackgroundSessionOptions.hpp +8 -8
- package/nitrogen/generated/android/c++/JBluetoothCapabilities.hpp +105 -0
- package/nitrogen/generated/android/c++/JBluetoothPhy.hpp +61 -0
- package/nitrogen/generated/android/c++/JBluetoothPhyOption.hpp +61 -0
- package/nitrogen/generated/android/c++/JBondState.hpp +64 -0
- package/nitrogen/generated/android/c++/JDescriptorValue.hpp +69 -0
- package/nitrogen/generated/android/c++/JExtendedAdvertisingOptions.hpp +131 -0
- package/nitrogen/generated/android/c++/JGATTCharacteristic.hpp +35 -11
- package/nitrogen/generated/android/c++/JGATTDescriptor.hpp +85 -0
- package/nitrogen/generated/android/c++/JGATTService.hpp +33 -9
- package/nitrogen/generated/android/c++/JHybridMunimBluetoothSpec.cpp +422 -12
- package/nitrogen/generated/android/c++/JHybridMunimBluetoothSpec.hpp +29 -0
- package/nitrogen/generated/android/c++/JL2CAPChannel.hpp +66 -0
- package/nitrogen/generated/android/c++/JMultipeerDiscoveryInfoEntry.hpp +61 -0
- package/nitrogen/generated/android/c++/JMultipeerEncryptionPreference.hpp +61 -0
- package/nitrogen/generated/android/c++/JMultipeerPeer.hpp +93 -0
- package/nitrogen/generated/android/c++/JMultipeerPeerState.hpp +61 -0
- package/nitrogen/generated/android/c++/JMultipeerSessionOptions.hpp +105 -0
- package/nitrogen/generated/android/c++/JPhyStatus.hpp +62 -0
- package/nitrogen/generated/android/c++/JScanOptions.hpp +8 -8
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/AdvertisingDataTypes.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/AdvertisingOptions.kt +19 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/BackgroundSessionOptions.kt +27 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/BluetoothCapabilities.kt +111 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/BluetoothPhy.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/BluetoothPhyOption.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/BondState.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/CharacteristicValue.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/DescriptorValue.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ExtendedAdvertisingOptions.kt +111 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/GATTCharacteristic.kt +25 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/GATTDescriptor.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/GATTService.kt +23 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/HybridMunimBluetoothSpec.kt +138 -22
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/L2CAPChannel.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MultipeerDiscoveryInfoEntry.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MultipeerEncryptionPreference.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MultipeerPeer.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MultipeerPeerState.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MultipeerSessionOptions.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/PhyStatus.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ScanOptions.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ServiceDataEntry.kt +15 -0
- package/nitrogen/generated/ios/MunimBluetooth+autolinking.rb +2 -0
- package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Bridge.cpp +61 -5
- package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Bridge.hpp +494 -49
- package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Umbrella.hpp +42 -0
- package/nitrogen/generated/ios/c++/HybridMunimBluetoothSpecSwift.hpp +254 -0
- package/nitrogen/generated/ios/swift/BluetoothCapabilities.swift +89 -0
- package/nitrogen/generated/ios/swift/BluetoothPhy.swift +44 -0
- package/nitrogen/generated/ios/swift/BluetoothPhyOption.swift +44 -0
- package/nitrogen/generated/ios/swift/BondState.swift +48 -0
- package/nitrogen/generated/ios/swift/DescriptorValue.swift +44 -0
- package/nitrogen/generated/ios/swift/ExtendedAdvertisingOptions.swift +243 -0
- package/nitrogen/generated/ios/swift/Func_void_BluetoothCapabilities.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BondState.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_DescriptorValue.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_L2CAPChannel.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_PhyStatus.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_MultipeerPeer_.swift +46 -0
- package/nitrogen/generated/ios/swift/GATTCharacteristic.swift +25 -1
- package/nitrogen/generated/ios/swift/GATTDescriptor.swift +71 -0
- package/nitrogen/generated/ios/swift/GATTService.swift +25 -1
- package/nitrogen/generated/ios/swift/HybridMunimBluetoothSpec.swift +29 -0
- package/nitrogen/generated/ios/swift/HybridMunimBluetoothSpec_cxx.swift +556 -23
- package/nitrogen/generated/ios/swift/L2CAPChannel.swift +52 -0
- package/nitrogen/generated/ios/swift/MultipeerDiscoveryInfoEntry.swift +34 -0
- package/nitrogen/generated/ios/swift/MultipeerEncryptionPreference.swift +44 -0
- package/nitrogen/generated/ios/swift/MultipeerPeer.swift +63 -0
- package/nitrogen/generated/ios/swift/MultipeerPeerState.swift +44 -0
- package/nitrogen/generated/ios/swift/MultipeerSessionOptions.swift +136 -0
- package/nitrogen/generated/ios/swift/PhyStatus.swift +34 -0
- package/nitrogen/generated/shared/c++/BluetoothCapabilities.hpp +131 -0
- package/nitrogen/generated/shared/c++/BluetoothPhy.hpp +80 -0
- package/nitrogen/generated/shared/c++/BluetoothPhyOption.hpp +80 -0
- package/nitrogen/generated/shared/c++/BondState.hpp +84 -0
- package/nitrogen/generated/shared/c++/DescriptorValue.hpp +95 -0
- package/nitrogen/generated/shared/c++/ExtendedAdvertisingOptions.hpp +138 -0
- package/nitrogen/generated/shared/c++/GATTCharacteristic.hpp +9 -3
- package/nitrogen/generated/shared/c++/GATTDescriptor.hpp +93 -0
- package/nitrogen/generated/shared/c++/GATTService.hpp +7 -2
- package/nitrogen/generated/shared/c++/HybridMunimBluetoothSpec.cpp +29 -0
- package/nitrogen/generated/shared/c++/HybridMunimBluetoothSpec.hpp +61 -2
- package/nitrogen/generated/shared/c++/L2CAPChannel.hpp +92 -0
- package/nitrogen/generated/shared/c++/MultipeerDiscoveryInfoEntry.hpp +87 -0
- package/nitrogen/generated/shared/c++/MultipeerEncryptionPreference.hpp +80 -0
- package/nitrogen/generated/shared/c++/MultipeerPeer.hpp +102 -0
- package/nitrogen/generated/shared/c++/MultipeerPeerState.hpp +80 -0
- package/nitrogen/generated/shared/c++/MultipeerSessionOptions.hpp +114 -0
- package/nitrogen/generated/shared/c++/PhyStatus.hpp +88 -0
- package/package.json +23 -12
- package/src/index.ts +416 -31
- package/src/specs/munim-bluetooth.nitro.ts +298 -14
|
@@ -10,14 +10,38 @@
|
|
|
10
10
|
// Forward declarations of C++ defined types
|
|
11
11
|
// Forward declaration of `AdvertisingDataTypes` to properly resolve imports.
|
|
12
12
|
namespace margelo::nitro::munimbluetooth { struct AdvertisingDataTypes; }
|
|
13
|
+
// Forward declaration of `BluetoothCapabilities` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::munimbluetooth { struct BluetoothCapabilities; }
|
|
15
|
+
// Forward declaration of `BluetoothPhyOption` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::munimbluetooth { enum class BluetoothPhyOption; }
|
|
17
|
+
// Forward declaration of `BluetoothPhy` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::munimbluetooth { enum class BluetoothPhy; }
|
|
19
|
+
// Forward declaration of `BondState` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::munimbluetooth { enum class BondState; }
|
|
13
21
|
// Forward declaration of `CharacteristicValue` to properly resolve imports.
|
|
14
22
|
namespace margelo::nitro::munimbluetooth { struct CharacteristicValue; }
|
|
23
|
+
// Forward declaration of `DescriptorValue` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::munimbluetooth { struct DescriptorValue; }
|
|
15
25
|
// Forward declaration of `GATTCharacteristic` to properly resolve imports.
|
|
16
26
|
namespace margelo::nitro::munimbluetooth { struct GATTCharacteristic; }
|
|
27
|
+
// Forward declaration of `GATTDescriptor` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::munimbluetooth { struct GATTDescriptor; }
|
|
17
29
|
// Forward declaration of `GATTService` to properly resolve imports.
|
|
18
30
|
namespace margelo::nitro::munimbluetooth { struct GATTService; }
|
|
19
31
|
// Forward declaration of `HybridMunimBluetoothSpec` to properly resolve imports.
|
|
20
32
|
namespace margelo::nitro::munimbluetooth { class HybridMunimBluetoothSpec; }
|
|
33
|
+
// Forward declaration of `L2CAPChannel` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::munimbluetooth { struct L2CAPChannel; }
|
|
35
|
+
// Forward declaration of `MultipeerDiscoveryInfoEntry` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::munimbluetooth { struct MultipeerDiscoveryInfoEntry; }
|
|
37
|
+
// Forward declaration of `MultipeerEncryptionPreference` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::munimbluetooth { enum class MultipeerEncryptionPreference; }
|
|
39
|
+
// Forward declaration of `MultipeerPeerState` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::munimbluetooth { enum class MultipeerPeerState; }
|
|
41
|
+
// Forward declaration of `MultipeerPeer` to properly resolve imports.
|
|
42
|
+
namespace margelo::nitro::munimbluetooth { struct MultipeerPeer; }
|
|
43
|
+
// Forward declaration of `PhyStatus` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::munimbluetooth { struct PhyStatus; }
|
|
21
45
|
// Forward declaration of `ScanMode` to properly resolve imports.
|
|
22
46
|
namespace margelo::nitro::munimbluetooth { enum class ScanMode; }
|
|
23
47
|
// Forward declaration of `ScanOptions` to properly resolve imports.
|
|
@@ -33,10 +57,22 @@ namespace MunimBluetooth { class HybridMunimBluetoothSpec_cxx; }
|
|
|
33
57
|
|
|
34
58
|
// Include C++ defined types
|
|
35
59
|
#include "AdvertisingDataTypes.hpp"
|
|
60
|
+
#include "BluetoothCapabilities.hpp"
|
|
61
|
+
#include "BluetoothPhy.hpp"
|
|
62
|
+
#include "BluetoothPhyOption.hpp"
|
|
63
|
+
#include "BondState.hpp"
|
|
36
64
|
#include "CharacteristicValue.hpp"
|
|
65
|
+
#include "DescriptorValue.hpp"
|
|
37
66
|
#include "GATTCharacteristic.hpp"
|
|
67
|
+
#include "GATTDescriptor.hpp"
|
|
38
68
|
#include "GATTService.hpp"
|
|
39
69
|
#include "HybridMunimBluetoothSpec.hpp"
|
|
70
|
+
#include "L2CAPChannel.hpp"
|
|
71
|
+
#include "MultipeerDiscoveryInfoEntry.hpp"
|
|
72
|
+
#include "MultipeerEncryptionPreference.hpp"
|
|
73
|
+
#include "MultipeerPeer.hpp"
|
|
74
|
+
#include "MultipeerPeerState.hpp"
|
|
75
|
+
#include "PhyStatus.hpp"
|
|
40
76
|
#include "ScanMode.hpp"
|
|
41
77
|
#include "ScanOptions.hpp"
|
|
42
78
|
#include "ServiceDataEntry.hpp"
|
|
@@ -210,6 +246,32 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
|
210
246
|
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
211
247
|
}
|
|
212
248
|
|
|
249
|
+
// pragma MARK: std::vector<GATTDescriptor>
|
|
250
|
+
/**
|
|
251
|
+
* Specialized version of `std::vector<GATTDescriptor>`.
|
|
252
|
+
*/
|
|
253
|
+
using std__vector_GATTDescriptor_ = std::vector<GATTDescriptor>;
|
|
254
|
+
inline std::vector<GATTDescriptor> create_std__vector_GATTDescriptor_(size_t size) noexcept {
|
|
255
|
+
std::vector<GATTDescriptor> vector;
|
|
256
|
+
vector.reserve(size);
|
|
257
|
+
return vector;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// pragma MARK: std::optional<std::vector<GATTDescriptor>>
|
|
261
|
+
/**
|
|
262
|
+
* Specialized version of `std::optional<std::vector<GATTDescriptor>>`.
|
|
263
|
+
*/
|
|
264
|
+
using std__optional_std__vector_GATTDescriptor__ = std::optional<std::vector<GATTDescriptor>>;
|
|
265
|
+
inline std::optional<std::vector<GATTDescriptor>> create_std__optional_std__vector_GATTDescriptor__(const std::vector<GATTDescriptor>& value) noexcept {
|
|
266
|
+
return std::optional<std::vector<GATTDescriptor>>(value);
|
|
267
|
+
}
|
|
268
|
+
inline bool has_value_std__optional_std__vector_GATTDescriptor__(const std::optional<std::vector<GATTDescriptor>>& optional) noexcept {
|
|
269
|
+
return optional.has_value();
|
|
270
|
+
}
|
|
271
|
+
inline std::vector<GATTDescriptor> get_std__optional_std__vector_GATTDescriptor__(const std::optional<std::vector<GATTDescriptor>>& optional) noexcept {
|
|
272
|
+
return optional.value();
|
|
273
|
+
}
|
|
274
|
+
|
|
213
275
|
// pragma MARK: std::vector<GATTCharacteristic>
|
|
214
276
|
/**
|
|
215
277
|
* Specialized version of `std::vector<GATTCharacteristic>`.
|
|
@@ -232,6 +294,55 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
|
232
294
|
return vector;
|
|
233
295
|
}
|
|
234
296
|
|
|
297
|
+
// pragma MARK: std::shared_ptr<Promise<void>>
|
|
298
|
+
/**
|
|
299
|
+
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
300
|
+
*/
|
|
301
|
+
using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
|
|
302
|
+
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
|
|
303
|
+
return Promise<void>::create();
|
|
304
|
+
}
|
|
305
|
+
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
|
|
306
|
+
return PromiseHolder<void>(std::move(promise));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// pragma MARK: std::function<void()>
|
|
310
|
+
/**
|
|
311
|
+
* Specialized version of `std::function<void()>`.
|
|
312
|
+
*/
|
|
313
|
+
using Func_void = std::function<void()>;
|
|
314
|
+
/**
|
|
315
|
+
* Wrapper class for a `std::function<void()>`, this can be used from Swift.
|
|
316
|
+
*/
|
|
317
|
+
class Func_void_Wrapper final {
|
|
318
|
+
public:
|
|
319
|
+
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
|
|
320
|
+
inline void call() const noexcept {
|
|
321
|
+
_function->operator()();
|
|
322
|
+
}
|
|
323
|
+
private:
|
|
324
|
+
std::unique_ptr<std::function<void()>> _function;
|
|
325
|
+
} SWIFT_NONCOPYABLE;
|
|
326
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
327
|
+
inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
|
|
328
|
+
return Func_void_Wrapper(std::move(value));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// pragma MARK: std::optional<bool>
|
|
332
|
+
/**
|
|
333
|
+
* Specialized version of `std::optional<bool>`.
|
|
334
|
+
*/
|
|
335
|
+
using std__optional_bool_ = std::optional<bool>;
|
|
336
|
+
inline std::optional<bool> create_std__optional_bool_(const bool& value) noexcept {
|
|
337
|
+
return std::optional<bool>(value);
|
|
338
|
+
}
|
|
339
|
+
inline bool has_value_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
340
|
+
return optional.has_value();
|
|
341
|
+
}
|
|
342
|
+
inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
343
|
+
return optional.value();
|
|
344
|
+
}
|
|
345
|
+
|
|
235
346
|
// pragma MARK: std::shared_ptr<Promise<bool>>
|
|
236
347
|
/**
|
|
237
348
|
* Specialized version of `std::shared_ptr<Promise<bool>>`.
|
|
@@ -266,19 +377,38 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
|
266
377
|
return Func_void_bool_Wrapper(std::move(value));
|
|
267
378
|
}
|
|
268
379
|
|
|
269
|
-
// pragma MARK: std::
|
|
380
|
+
// pragma MARK: std::shared_ptr<Promise<BluetoothCapabilities>>
|
|
270
381
|
/**
|
|
271
|
-
* Specialized version of `std::
|
|
382
|
+
* Specialized version of `std::shared_ptr<Promise<BluetoothCapabilities>>`.
|
|
272
383
|
*/
|
|
273
|
-
using
|
|
274
|
-
inline std::
|
|
275
|
-
return
|
|
384
|
+
using std__shared_ptr_Promise_BluetoothCapabilities__ = std::shared_ptr<Promise<BluetoothCapabilities>>;
|
|
385
|
+
inline std::shared_ptr<Promise<BluetoothCapabilities>> create_std__shared_ptr_Promise_BluetoothCapabilities__() noexcept {
|
|
386
|
+
return Promise<BluetoothCapabilities>::create();
|
|
276
387
|
}
|
|
277
|
-
inline
|
|
278
|
-
return
|
|
388
|
+
inline PromiseHolder<BluetoothCapabilities> wrap_std__shared_ptr_Promise_BluetoothCapabilities__(std::shared_ptr<Promise<BluetoothCapabilities>> promise) noexcept {
|
|
389
|
+
return PromiseHolder<BluetoothCapabilities>(std::move(promise));
|
|
279
390
|
}
|
|
280
|
-
|
|
281
|
-
|
|
391
|
+
|
|
392
|
+
// pragma MARK: std::function<void(const BluetoothCapabilities& /* result */)>
|
|
393
|
+
/**
|
|
394
|
+
* Specialized version of `std::function<void(const BluetoothCapabilities&)>`.
|
|
395
|
+
*/
|
|
396
|
+
using Func_void_BluetoothCapabilities = std::function<void(const BluetoothCapabilities& /* result */)>;
|
|
397
|
+
/**
|
|
398
|
+
* Wrapper class for a `std::function<void(const BluetoothCapabilities& / * result * /)>`, this can be used from Swift.
|
|
399
|
+
*/
|
|
400
|
+
class Func_void_BluetoothCapabilities_Wrapper final {
|
|
401
|
+
public:
|
|
402
|
+
explicit Func_void_BluetoothCapabilities_Wrapper(std::function<void(const BluetoothCapabilities& /* result */)>&& func): _function(std::make_unique<std::function<void(const BluetoothCapabilities& /* result */)>>(std::move(func))) {}
|
|
403
|
+
inline void call(BluetoothCapabilities result) const noexcept {
|
|
404
|
+
_function->operator()(result);
|
|
405
|
+
}
|
|
406
|
+
private:
|
|
407
|
+
std::unique_ptr<std::function<void(const BluetoothCapabilities& /* result */)>> _function;
|
|
408
|
+
} SWIFT_NONCOPYABLE;
|
|
409
|
+
Func_void_BluetoothCapabilities create_Func_void_BluetoothCapabilities(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
410
|
+
inline Func_void_BluetoothCapabilities_Wrapper wrap_Func_void_BluetoothCapabilities(Func_void_BluetoothCapabilities value) noexcept {
|
|
411
|
+
return Func_void_BluetoothCapabilities_Wrapper(std::move(value));
|
|
282
412
|
}
|
|
283
413
|
|
|
284
414
|
// pragma MARK: std::optional<ScanMode>
|
|
@@ -311,40 +441,6 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
|
311
441
|
return optional.value();
|
|
312
442
|
}
|
|
313
443
|
|
|
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
444
|
// pragma MARK: std::shared_ptr<Promise<std::vector<GATTService>>>
|
|
349
445
|
/**
|
|
350
446
|
* Specialized version of `std::shared_ptr<Promise<std::vector<GATTService>>>`.
|
|
@@ -413,6 +509,40 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
|
413
509
|
return Func_void_CharacteristicValue_Wrapper(std::move(value));
|
|
414
510
|
}
|
|
415
511
|
|
|
512
|
+
// pragma MARK: std::shared_ptr<Promise<DescriptorValue>>
|
|
513
|
+
/**
|
|
514
|
+
* Specialized version of `std::shared_ptr<Promise<DescriptorValue>>`.
|
|
515
|
+
*/
|
|
516
|
+
using std__shared_ptr_Promise_DescriptorValue__ = std::shared_ptr<Promise<DescriptorValue>>;
|
|
517
|
+
inline std::shared_ptr<Promise<DescriptorValue>> create_std__shared_ptr_Promise_DescriptorValue__() noexcept {
|
|
518
|
+
return Promise<DescriptorValue>::create();
|
|
519
|
+
}
|
|
520
|
+
inline PromiseHolder<DescriptorValue> wrap_std__shared_ptr_Promise_DescriptorValue__(std::shared_ptr<Promise<DescriptorValue>> promise) noexcept {
|
|
521
|
+
return PromiseHolder<DescriptorValue>(std::move(promise));
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
// pragma MARK: std::function<void(const DescriptorValue& /* result */)>
|
|
525
|
+
/**
|
|
526
|
+
* Specialized version of `std::function<void(const DescriptorValue&)>`.
|
|
527
|
+
*/
|
|
528
|
+
using Func_void_DescriptorValue = std::function<void(const DescriptorValue& /* result */)>;
|
|
529
|
+
/**
|
|
530
|
+
* Wrapper class for a `std::function<void(const DescriptorValue& / * result * /)>`, this can be used from Swift.
|
|
531
|
+
*/
|
|
532
|
+
class Func_void_DescriptorValue_Wrapper final {
|
|
533
|
+
public:
|
|
534
|
+
explicit Func_void_DescriptorValue_Wrapper(std::function<void(const DescriptorValue& /* result */)>&& func): _function(std::make_unique<std::function<void(const DescriptorValue& /* result */)>>(std::move(func))) {}
|
|
535
|
+
inline void call(DescriptorValue result) const noexcept {
|
|
536
|
+
_function->operator()(result);
|
|
537
|
+
}
|
|
538
|
+
private:
|
|
539
|
+
std::unique_ptr<std::function<void(const DescriptorValue& /* result */)>> _function;
|
|
540
|
+
} SWIFT_NONCOPYABLE;
|
|
541
|
+
Func_void_DescriptorValue create_Func_void_DescriptorValue(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
542
|
+
inline Func_void_DescriptorValue_Wrapper wrap_Func_void_DescriptorValue(Func_void_DescriptorValue value) noexcept {
|
|
543
|
+
return Func_void_DescriptorValue_Wrapper(std::move(value));
|
|
544
|
+
}
|
|
545
|
+
|
|
416
546
|
// pragma MARK: std::optional<WriteType>
|
|
417
547
|
/**
|
|
418
548
|
* Specialized version of `std::optional<WriteType>`.
|
|
@@ -496,6 +626,258 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
|
496
626
|
return Func_void_double_Wrapper(std::move(value));
|
|
497
627
|
}
|
|
498
628
|
|
|
629
|
+
// pragma MARK: std::optional<BluetoothPhyOption>
|
|
630
|
+
/**
|
|
631
|
+
* Specialized version of `std::optional<BluetoothPhyOption>`.
|
|
632
|
+
*/
|
|
633
|
+
using std__optional_BluetoothPhyOption_ = std::optional<BluetoothPhyOption>;
|
|
634
|
+
inline std::optional<BluetoothPhyOption> create_std__optional_BluetoothPhyOption_(const BluetoothPhyOption& value) noexcept {
|
|
635
|
+
return std::optional<BluetoothPhyOption>(value);
|
|
636
|
+
}
|
|
637
|
+
inline bool has_value_std__optional_BluetoothPhyOption_(const std::optional<BluetoothPhyOption>& optional) noexcept {
|
|
638
|
+
return optional.has_value();
|
|
639
|
+
}
|
|
640
|
+
inline BluetoothPhyOption get_std__optional_BluetoothPhyOption_(const std::optional<BluetoothPhyOption>& optional) noexcept {
|
|
641
|
+
return optional.value();
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
// pragma MARK: std::shared_ptr<Promise<PhyStatus>>
|
|
645
|
+
/**
|
|
646
|
+
* Specialized version of `std::shared_ptr<Promise<PhyStatus>>`.
|
|
647
|
+
*/
|
|
648
|
+
using std__shared_ptr_Promise_PhyStatus__ = std::shared_ptr<Promise<PhyStatus>>;
|
|
649
|
+
inline std::shared_ptr<Promise<PhyStatus>> create_std__shared_ptr_Promise_PhyStatus__() noexcept {
|
|
650
|
+
return Promise<PhyStatus>::create();
|
|
651
|
+
}
|
|
652
|
+
inline PromiseHolder<PhyStatus> wrap_std__shared_ptr_Promise_PhyStatus__(std::shared_ptr<Promise<PhyStatus>> promise) noexcept {
|
|
653
|
+
return PromiseHolder<PhyStatus>(std::move(promise));
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
// pragma MARK: std::function<void(const PhyStatus& /* result */)>
|
|
657
|
+
/**
|
|
658
|
+
* Specialized version of `std::function<void(const PhyStatus&)>`.
|
|
659
|
+
*/
|
|
660
|
+
using Func_void_PhyStatus = std::function<void(const PhyStatus& /* result */)>;
|
|
661
|
+
/**
|
|
662
|
+
* Wrapper class for a `std::function<void(const PhyStatus& / * result * /)>`, this can be used from Swift.
|
|
663
|
+
*/
|
|
664
|
+
class Func_void_PhyStatus_Wrapper final {
|
|
665
|
+
public:
|
|
666
|
+
explicit Func_void_PhyStatus_Wrapper(std::function<void(const PhyStatus& /* result */)>&& func): _function(std::make_unique<std::function<void(const PhyStatus& /* result */)>>(std::move(func))) {}
|
|
667
|
+
inline void call(PhyStatus result) const noexcept {
|
|
668
|
+
_function->operator()(result);
|
|
669
|
+
}
|
|
670
|
+
private:
|
|
671
|
+
std::unique_ptr<std::function<void(const PhyStatus& /* result */)>> _function;
|
|
672
|
+
} SWIFT_NONCOPYABLE;
|
|
673
|
+
Func_void_PhyStatus create_Func_void_PhyStatus(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
674
|
+
inline Func_void_PhyStatus_Wrapper wrap_Func_void_PhyStatus(Func_void_PhyStatus value) noexcept {
|
|
675
|
+
return Func_void_PhyStatus_Wrapper(std::move(value));
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
// pragma MARK: std::shared_ptr<Promise<BondState>>
|
|
679
|
+
/**
|
|
680
|
+
* Specialized version of `std::shared_ptr<Promise<BondState>>`.
|
|
681
|
+
*/
|
|
682
|
+
using std__shared_ptr_Promise_BondState__ = std::shared_ptr<Promise<BondState>>;
|
|
683
|
+
inline std::shared_ptr<Promise<BondState>> create_std__shared_ptr_Promise_BondState__() noexcept {
|
|
684
|
+
return Promise<BondState>::create();
|
|
685
|
+
}
|
|
686
|
+
inline PromiseHolder<BondState> wrap_std__shared_ptr_Promise_BondState__(std::shared_ptr<Promise<BondState>> promise) noexcept {
|
|
687
|
+
return PromiseHolder<BondState>(std::move(promise));
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
// pragma MARK: std::function<void(BondState /* result */)>
|
|
691
|
+
/**
|
|
692
|
+
* Specialized version of `std::function<void(BondState)>`.
|
|
693
|
+
*/
|
|
694
|
+
using Func_void_BondState = std::function<void(BondState /* result */)>;
|
|
695
|
+
/**
|
|
696
|
+
* Wrapper class for a `std::function<void(BondState / * result * /)>`, this can be used from Swift.
|
|
697
|
+
*/
|
|
698
|
+
class Func_void_BondState_Wrapper final {
|
|
699
|
+
public:
|
|
700
|
+
explicit Func_void_BondState_Wrapper(std::function<void(BondState /* result */)>&& func): _function(std::make_unique<std::function<void(BondState /* result */)>>(std::move(func))) {}
|
|
701
|
+
inline void call(int result) const noexcept {
|
|
702
|
+
_function->operator()(static_cast<BondState>(result));
|
|
703
|
+
}
|
|
704
|
+
private:
|
|
705
|
+
std::unique_ptr<std::function<void(BondState /* result */)>> _function;
|
|
706
|
+
} SWIFT_NONCOPYABLE;
|
|
707
|
+
Func_void_BondState create_Func_void_BondState(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
708
|
+
inline Func_void_BondState_Wrapper wrap_Func_void_BondState(Func_void_BondState value) noexcept {
|
|
709
|
+
return Func_void_BondState_Wrapper(std::move(value));
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
// pragma MARK: std::shared_ptr<Promise<std::string>>
|
|
713
|
+
/**
|
|
714
|
+
* Specialized version of `std::shared_ptr<Promise<std::string>>`.
|
|
715
|
+
*/
|
|
716
|
+
using std__shared_ptr_Promise_std__string__ = std::shared_ptr<Promise<std::string>>;
|
|
717
|
+
inline std::shared_ptr<Promise<std::string>> create_std__shared_ptr_Promise_std__string__() noexcept {
|
|
718
|
+
return Promise<std::string>::create();
|
|
719
|
+
}
|
|
720
|
+
inline PromiseHolder<std::string> wrap_std__shared_ptr_Promise_std__string__(std::shared_ptr<Promise<std::string>> promise) noexcept {
|
|
721
|
+
return PromiseHolder<std::string>(std::move(promise));
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
// pragma MARK: std::function<void(const std::string& /* result */)>
|
|
725
|
+
/**
|
|
726
|
+
* Specialized version of `std::function<void(const std::string&)>`.
|
|
727
|
+
*/
|
|
728
|
+
using Func_void_std__string = std::function<void(const std::string& /* result */)>;
|
|
729
|
+
/**
|
|
730
|
+
* Wrapper class for a `std::function<void(const std::string& / * result * /)>`, this can be used from Swift.
|
|
731
|
+
*/
|
|
732
|
+
class Func_void_std__string_Wrapper final {
|
|
733
|
+
public:
|
|
734
|
+
explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::string& /* result */)>>(std::move(func))) {}
|
|
735
|
+
inline void call(std::string result) const noexcept {
|
|
736
|
+
_function->operator()(result);
|
|
737
|
+
}
|
|
738
|
+
private:
|
|
739
|
+
std::unique_ptr<std::function<void(const std::string& /* result */)>> _function;
|
|
740
|
+
} SWIFT_NONCOPYABLE;
|
|
741
|
+
Func_void_std__string create_Func_void_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
742
|
+
inline Func_void_std__string_Wrapper wrap_Func_void_std__string(Func_void_std__string value) noexcept {
|
|
743
|
+
return Func_void_std__string_Wrapper(std::move(value));
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
// pragma MARK: std::optional<BluetoothPhy>
|
|
747
|
+
/**
|
|
748
|
+
* Specialized version of `std::optional<BluetoothPhy>`.
|
|
749
|
+
*/
|
|
750
|
+
using std__optional_BluetoothPhy_ = std::optional<BluetoothPhy>;
|
|
751
|
+
inline std::optional<BluetoothPhy> create_std__optional_BluetoothPhy_(const BluetoothPhy& value) noexcept {
|
|
752
|
+
return std::optional<BluetoothPhy>(value);
|
|
753
|
+
}
|
|
754
|
+
inline bool has_value_std__optional_BluetoothPhy_(const std::optional<BluetoothPhy>& optional) noexcept {
|
|
755
|
+
return optional.has_value();
|
|
756
|
+
}
|
|
757
|
+
inline BluetoothPhy get_std__optional_BluetoothPhy_(const std::optional<BluetoothPhy>& optional) noexcept {
|
|
758
|
+
return optional.value();
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
// pragma MARK: std::shared_ptr<Promise<L2CAPChannel>>
|
|
762
|
+
/**
|
|
763
|
+
* Specialized version of `std::shared_ptr<Promise<L2CAPChannel>>`.
|
|
764
|
+
*/
|
|
765
|
+
using std__shared_ptr_Promise_L2CAPChannel__ = std::shared_ptr<Promise<L2CAPChannel>>;
|
|
766
|
+
inline std::shared_ptr<Promise<L2CAPChannel>> create_std__shared_ptr_Promise_L2CAPChannel__() noexcept {
|
|
767
|
+
return Promise<L2CAPChannel>::create();
|
|
768
|
+
}
|
|
769
|
+
inline PromiseHolder<L2CAPChannel> wrap_std__shared_ptr_Promise_L2CAPChannel__(std::shared_ptr<Promise<L2CAPChannel>> promise) noexcept {
|
|
770
|
+
return PromiseHolder<L2CAPChannel>(std::move(promise));
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
// pragma MARK: std::function<void(const L2CAPChannel& /* result */)>
|
|
774
|
+
/**
|
|
775
|
+
* Specialized version of `std::function<void(const L2CAPChannel&)>`.
|
|
776
|
+
*/
|
|
777
|
+
using Func_void_L2CAPChannel = std::function<void(const L2CAPChannel& /* result */)>;
|
|
778
|
+
/**
|
|
779
|
+
* Wrapper class for a `std::function<void(const L2CAPChannel& / * result * /)>`, this can be used from Swift.
|
|
780
|
+
*/
|
|
781
|
+
class Func_void_L2CAPChannel_Wrapper final {
|
|
782
|
+
public:
|
|
783
|
+
explicit Func_void_L2CAPChannel_Wrapper(std::function<void(const L2CAPChannel& /* result */)>&& func): _function(std::make_unique<std::function<void(const L2CAPChannel& /* result */)>>(std::move(func))) {}
|
|
784
|
+
inline void call(L2CAPChannel result) const noexcept {
|
|
785
|
+
_function->operator()(result);
|
|
786
|
+
}
|
|
787
|
+
private:
|
|
788
|
+
std::unique_ptr<std::function<void(const L2CAPChannel& /* result */)>> _function;
|
|
789
|
+
} SWIFT_NONCOPYABLE;
|
|
790
|
+
Func_void_L2CAPChannel create_Func_void_L2CAPChannel(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
791
|
+
inline Func_void_L2CAPChannel_Wrapper wrap_Func_void_L2CAPChannel(Func_void_L2CAPChannel value) noexcept {
|
|
792
|
+
return Func_void_L2CAPChannel_Wrapper(std::move(value));
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
// pragma MARK: std::vector<MultipeerDiscoveryInfoEntry>
|
|
796
|
+
/**
|
|
797
|
+
* Specialized version of `std::vector<MultipeerDiscoveryInfoEntry>`.
|
|
798
|
+
*/
|
|
799
|
+
using std__vector_MultipeerDiscoveryInfoEntry_ = std::vector<MultipeerDiscoveryInfoEntry>;
|
|
800
|
+
inline std::vector<MultipeerDiscoveryInfoEntry> create_std__vector_MultipeerDiscoveryInfoEntry_(size_t size) noexcept {
|
|
801
|
+
std::vector<MultipeerDiscoveryInfoEntry> vector;
|
|
802
|
+
vector.reserve(size);
|
|
803
|
+
return vector;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
// pragma MARK: std::optional<std::vector<MultipeerDiscoveryInfoEntry>>
|
|
807
|
+
/**
|
|
808
|
+
* Specialized version of `std::optional<std::vector<MultipeerDiscoveryInfoEntry>>`.
|
|
809
|
+
*/
|
|
810
|
+
using std__optional_std__vector_MultipeerDiscoveryInfoEntry__ = std::optional<std::vector<MultipeerDiscoveryInfoEntry>>;
|
|
811
|
+
inline std::optional<std::vector<MultipeerDiscoveryInfoEntry>> create_std__optional_std__vector_MultipeerDiscoveryInfoEntry__(const std::vector<MultipeerDiscoveryInfoEntry>& value) noexcept {
|
|
812
|
+
return std::optional<std::vector<MultipeerDiscoveryInfoEntry>>(value);
|
|
813
|
+
}
|
|
814
|
+
inline bool has_value_std__optional_std__vector_MultipeerDiscoveryInfoEntry__(const std::optional<std::vector<MultipeerDiscoveryInfoEntry>>& optional) noexcept {
|
|
815
|
+
return optional.has_value();
|
|
816
|
+
}
|
|
817
|
+
inline std::vector<MultipeerDiscoveryInfoEntry> get_std__optional_std__vector_MultipeerDiscoveryInfoEntry__(const std::optional<std::vector<MultipeerDiscoveryInfoEntry>>& optional) noexcept {
|
|
818
|
+
return optional.value();
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
// pragma MARK: std::optional<MultipeerEncryptionPreference>
|
|
822
|
+
/**
|
|
823
|
+
* Specialized version of `std::optional<MultipeerEncryptionPreference>`.
|
|
824
|
+
*/
|
|
825
|
+
using std__optional_MultipeerEncryptionPreference_ = std::optional<MultipeerEncryptionPreference>;
|
|
826
|
+
inline std::optional<MultipeerEncryptionPreference> create_std__optional_MultipeerEncryptionPreference_(const MultipeerEncryptionPreference& value) noexcept {
|
|
827
|
+
return std::optional<MultipeerEncryptionPreference>(value);
|
|
828
|
+
}
|
|
829
|
+
inline bool has_value_std__optional_MultipeerEncryptionPreference_(const std::optional<MultipeerEncryptionPreference>& optional) noexcept {
|
|
830
|
+
return optional.has_value();
|
|
831
|
+
}
|
|
832
|
+
inline MultipeerEncryptionPreference get_std__optional_MultipeerEncryptionPreference_(const std::optional<MultipeerEncryptionPreference>& optional) noexcept {
|
|
833
|
+
return optional.value();
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
// pragma MARK: std::vector<MultipeerPeer>
|
|
837
|
+
/**
|
|
838
|
+
* Specialized version of `std::vector<MultipeerPeer>`.
|
|
839
|
+
*/
|
|
840
|
+
using std__vector_MultipeerPeer_ = std::vector<MultipeerPeer>;
|
|
841
|
+
inline std::vector<MultipeerPeer> create_std__vector_MultipeerPeer_(size_t size) noexcept {
|
|
842
|
+
std::vector<MultipeerPeer> vector;
|
|
843
|
+
vector.reserve(size);
|
|
844
|
+
return vector;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
// pragma MARK: std::shared_ptr<Promise<std::vector<MultipeerPeer>>>
|
|
848
|
+
/**
|
|
849
|
+
* Specialized version of `std::shared_ptr<Promise<std::vector<MultipeerPeer>>>`.
|
|
850
|
+
*/
|
|
851
|
+
using std__shared_ptr_Promise_std__vector_MultipeerPeer___ = std::shared_ptr<Promise<std::vector<MultipeerPeer>>>;
|
|
852
|
+
inline std::shared_ptr<Promise<std::vector<MultipeerPeer>>> create_std__shared_ptr_Promise_std__vector_MultipeerPeer___() noexcept {
|
|
853
|
+
return Promise<std::vector<MultipeerPeer>>::create();
|
|
854
|
+
}
|
|
855
|
+
inline PromiseHolder<std::vector<MultipeerPeer>> wrap_std__shared_ptr_Promise_std__vector_MultipeerPeer___(std::shared_ptr<Promise<std::vector<MultipeerPeer>>> promise) noexcept {
|
|
856
|
+
return PromiseHolder<std::vector<MultipeerPeer>>(std::move(promise));
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
// pragma MARK: std::function<void(const std::vector<MultipeerPeer>& /* result */)>
|
|
860
|
+
/**
|
|
861
|
+
* Specialized version of `std::function<void(const std::vector<MultipeerPeer>&)>`.
|
|
862
|
+
*/
|
|
863
|
+
using Func_void_std__vector_MultipeerPeer_ = std::function<void(const std::vector<MultipeerPeer>& /* result */)>;
|
|
864
|
+
/**
|
|
865
|
+
* Wrapper class for a `std::function<void(const std::vector<MultipeerPeer>& / * result * /)>`, this can be used from Swift.
|
|
866
|
+
*/
|
|
867
|
+
class Func_void_std__vector_MultipeerPeer__Wrapper final {
|
|
868
|
+
public:
|
|
869
|
+
explicit Func_void_std__vector_MultipeerPeer__Wrapper(std::function<void(const std::vector<MultipeerPeer>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<MultipeerPeer>& /* result */)>>(std::move(func))) {}
|
|
870
|
+
inline void call(std::vector<MultipeerPeer> result) const noexcept {
|
|
871
|
+
_function->operator()(result);
|
|
872
|
+
}
|
|
873
|
+
private:
|
|
874
|
+
std::unique_ptr<std::function<void(const std::vector<MultipeerPeer>& /* result */)>> _function;
|
|
875
|
+
} SWIFT_NONCOPYABLE;
|
|
876
|
+
Func_void_std__vector_MultipeerPeer_ create_Func_void_std__vector_MultipeerPeer_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
877
|
+
inline Func_void_std__vector_MultipeerPeer__Wrapper wrap_Func_void_std__vector_MultipeerPeer_(Func_void_std__vector_MultipeerPeer_ value) noexcept {
|
|
878
|
+
return Func_void_std__vector_MultipeerPeer__Wrapper(std::move(value));
|
|
879
|
+
}
|
|
880
|
+
|
|
499
881
|
// pragma MARK: std::shared_ptr<HybridMunimBluetoothSpec>
|
|
500
882
|
/**
|
|
501
883
|
* Specialized version of `std::shared_ptr<HybridMunimBluetoothSpec>`.
|
|
@@ -526,6 +908,15 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
|
526
908
|
return Result<std::shared_ptr<Promise<AdvertisingDataTypes>>>::withError(error);
|
|
527
909
|
}
|
|
528
910
|
|
|
911
|
+
// pragma MARK: Result<std::shared_ptr<Promise<void>>>
|
|
912
|
+
using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
|
|
913
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
|
|
914
|
+
return Result<std::shared_ptr<Promise<void>>>::withValue(value);
|
|
915
|
+
}
|
|
916
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
|
|
917
|
+
return Result<std::shared_ptr<Promise<void>>>::withError(error);
|
|
918
|
+
}
|
|
919
|
+
|
|
529
920
|
// pragma MARK: Result<std::shared_ptr<Promise<bool>>>
|
|
530
921
|
using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
|
|
531
922
|
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
|
|
@@ -535,13 +926,13 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
|
535
926
|
return Result<std::shared_ptr<Promise<bool>>>::withError(error);
|
|
536
927
|
}
|
|
537
928
|
|
|
538
|
-
// pragma MARK: Result<std::shared_ptr<Promise<
|
|
539
|
-
using
|
|
540
|
-
inline
|
|
541
|
-
return Result<std::shared_ptr<Promise<
|
|
929
|
+
// pragma MARK: Result<std::shared_ptr<Promise<BluetoothCapabilities>>>
|
|
930
|
+
using Result_std__shared_ptr_Promise_BluetoothCapabilities___ = Result<std::shared_ptr<Promise<BluetoothCapabilities>>>;
|
|
931
|
+
inline Result_std__shared_ptr_Promise_BluetoothCapabilities___ create_Result_std__shared_ptr_Promise_BluetoothCapabilities___(const std::shared_ptr<Promise<BluetoothCapabilities>>& value) noexcept {
|
|
932
|
+
return Result<std::shared_ptr<Promise<BluetoothCapabilities>>>::withValue(value);
|
|
542
933
|
}
|
|
543
|
-
inline
|
|
544
|
-
return Result<std::shared_ptr<Promise<
|
|
934
|
+
inline Result_std__shared_ptr_Promise_BluetoothCapabilities___ create_Result_std__shared_ptr_Promise_BluetoothCapabilities___(const std::exception_ptr& error) noexcept {
|
|
935
|
+
return Result<std::shared_ptr<Promise<BluetoothCapabilities>>>::withError(error);
|
|
545
936
|
}
|
|
546
937
|
|
|
547
938
|
// pragma MARK: Result<std::shared_ptr<Promise<std::vector<GATTService>>>>
|
|
@@ -562,6 +953,15 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
|
562
953
|
return Result<std::shared_ptr<Promise<CharacteristicValue>>>::withError(error);
|
|
563
954
|
}
|
|
564
955
|
|
|
956
|
+
// pragma MARK: Result<std::shared_ptr<Promise<DescriptorValue>>>
|
|
957
|
+
using Result_std__shared_ptr_Promise_DescriptorValue___ = Result<std::shared_ptr<Promise<DescriptorValue>>>;
|
|
958
|
+
inline Result_std__shared_ptr_Promise_DescriptorValue___ create_Result_std__shared_ptr_Promise_DescriptorValue___(const std::shared_ptr<Promise<DescriptorValue>>& value) noexcept {
|
|
959
|
+
return Result<std::shared_ptr<Promise<DescriptorValue>>>::withValue(value);
|
|
960
|
+
}
|
|
961
|
+
inline Result_std__shared_ptr_Promise_DescriptorValue___ create_Result_std__shared_ptr_Promise_DescriptorValue___(const std::exception_ptr& error) noexcept {
|
|
962
|
+
return Result<std::shared_ptr<Promise<DescriptorValue>>>::withError(error);
|
|
963
|
+
}
|
|
964
|
+
|
|
565
965
|
// pragma MARK: Result<std::shared_ptr<Promise<std::vector<std::string>>>>
|
|
566
966
|
using Result_std__shared_ptr_Promise_std__vector_std__string____ = Result<std::shared_ptr<Promise<std::vector<std::string>>>>;
|
|
567
967
|
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 {
|
|
@@ -579,5 +979,50 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
|
|
|
579
979
|
inline Result_std__shared_ptr_Promise_double___ create_Result_std__shared_ptr_Promise_double___(const std::exception_ptr& error) noexcept {
|
|
580
980
|
return Result<std::shared_ptr<Promise<double>>>::withError(error);
|
|
581
981
|
}
|
|
982
|
+
|
|
983
|
+
// pragma MARK: Result<std::shared_ptr<Promise<PhyStatus>>>
|
|
984
|
+
using Result_std__shared_ptr_Promise_PhyStatus___ = Result<std::shared_ptr<Promise<PhyStatus>>>;
|
|
985
|
+
inline Result_std__shared_ptr_Promise_PhyStatus___ create_Result_std__shared_ptr_Promise_PhyStatus___(const std::shared_ptr<Promise<PhyStatus>>& value) noexcept {
|
|
986
|
+
return Result<std::shared_ptr<Promise<PhyStatus>>>::withValue(value);
|
|
987
|
+
}
|
|
988
|
+
inline Result_std__shared_ptr_Promise_PhyStatus___ create_Result_std__shared_ptr_Promise_PhyStatus___(const std::exception_ptr& error) noexcept {
|
|
989
|
+
return Result<std::shared_ptr<Promise<PhyStatus>>>::withError(error);
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
// pragma MARK: Result<std::shared_ptr<Promise<BondState>>>
|
|
993
|
+
using Result_std__shared_ptr_Promise_BondState___ = Result<std::shared_ptr<Promise<BondState>>>;
|
|
994
|
+
inline Result_std__shared_ptr_Promise_BondState___ create_Result_std__shared_ptr_Promise_BondState___(const std::shared_ptr<Promise<BondState>>& value) noexcept {
|
|
995
|
+
return Result<std::shared_ptr<Promise<BondState>>>::withValue(value);
|
|
996
|
+
}
|
|
997
|
+
inline Result_std__shared_ptr_Promise_BondState___ create_Result_std__shared_ptr_Promise_BondState___(const std::exception_ptr& error) noexcept {
|
|
998
|
+
return Result<std::shared_ptr<Promise<BondState>>>::withError(error);
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::string>>>
|
|
1002
|
+
using Result_std__shared_ptr_Promise_std__string___ = Result<std::shared_ptr<Promise<std::string>>>;
|
|
1003
|
+
inline Result_std__shared_ptr_Promise_std__string___ create_Result_std__shared_ptr_Promise_std__string___(const std::shared_ptr<Promise<std::string>>& value) noexcept {
|
|
1004
|
+
return Result<std::shared_ptr<Promise<std::string>>>::withValue(value);
|
|
1005
|
+
}
|
|
1006
|
+
inline Result_std__shared_ptr_Promise_std__string___ create_Result_std__shared_ptr_Promise_std__string___(const std::exception_ptr& error) noexcept {
|
|
1007
|
+
return Result<std::shared_ptr<Promise<std::string>>>::withError(error);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
// pragma MARK: Result<std::shared_ptr<Promise<L2CAPChannel>>>
|
|
1011
|
+
using Result_std__shared_ptr_Promise_L2CAPChannel___ = Result<std::shared_ptr<Promise<L2CAPChannel>>>;
|
|
1012
|
+
inline Result_std__shared_ptr_Promise_L2CAPChannel___ create_Result_std__shared_ptr_Promise_L2CAPChannel___(const std::shared_ptr<Promise<L2CAPChannel>>& value) noexcept {
|
|
1013
|
+
return Result<std::shared_ptr<Promise<L2CAPChannel>>>::withValue(value);
|
|
1014
|
+
}
|
|
1015
|
+
inline Result_std__shared_ptr_Promise_L2CAPChannel___ create_Result_std__shared_ptr_Promise_L2CAPChannel___(const std::exception_ptr& error) noexcept {
|
|
1016
|
+
return Result<std::shared_ptr<Promise<L2CAPChannel>>>::withError(error);
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::vector<MultipeerPeer>>>>
|
|
1020
|
+
using Result_std__shared_ptr_Promise_std__vector_MultipeerPeer____ = Result<std::shared_ptr<Promise<std::vector<MultipeerPeer>>>>;
|
|
1021
|
+
inline Result_std__shared_ptr_Promise_std__vector_MultipeerPeer____ create_Result_std__shared_ptr_Promise_std__vector_MultipeerPeer____(const std::shared_ptr<Promise<std::vector<MultipeerPeer>>>& value) noexcept {
|
|
1022
|
+
return Result<std::shared_ptr<Promise<std::vector<MultipeerPeer>>>>::withValue(value);
|
|
1023
|
+
}
|
|
1024
|
+
inline Result_std__shared_ptr_Promise_std__vector_MultipeerPeer____ create_Result_std__shared_ptr_Promise_std__vector_MultipeerPeer____(const std::exception_ptr& error) noexcept {
|
|
1025
|
+
return Result<std::shared_ptr<Promise<std::vector<MultipeerPeer>>>>::withError(error);
|
|
1026
|
+
}
|
|
582
1027
|
|
|
583
1028
|
} // namespace margelo::nitro::munimbluetooth::bridge::swift
|