munim-bluetooth 0.2.7 → 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.
Files changed (71) hide show
  1. package/MunimBluetooth.podspec +1 -0
  2. package/lib/typescript/src/specs/munim-bluetooth.nitro.d.ts +24 -25
  3. package/lib/typescript/src/specs/munim-bluetooth.nitro.d.ts.map +1 -1
  4. package/nitrogen/generated/.gitattributes +1 -0
  5. package/nitrogen/generated/android/MunimBluetooth+autolinking.cmake +81 -0
  6. package/nitrogen/generated/android/MunimBluetooth+autolinking.gradle +27 -0
  7. package/nitrogen/generated/android/MunimBluetoothOnLoad.cpp +44 -0
  8. package/nitrogen/generated/android/MunimBluetoothOnLoad.hpp +25 -0
  9. package/nitrogen/generated/android/c++/JAdvertisingDataTypes.hpp +345 -0
  10. package/nitrogen/generated/android/c++/JAdvertisingOptions.hpp +93 -0
  11. package/nitrogen/generated/android/c++/JCharacteristicValue.hpp +65 -0
  12. package/nitrogen/generated/android/c++/JGATTCharacteristic.hpp +85 -0
  13. package/nitrogen/generated/android/c++/JGATTService.hpp +83 -0
  14. package/nitrogen/generated/android/c++/JHybridMunimBluetoothSpec.cpp +307 -0
  15. package/nitrogen/generated/android/c++/JHybridMunimBluetoothSpec.hpp +85 -0
  16. package/nitrogen/generated/android/c++/JScanMode.hpp +61 -0
  17. package/nitrogen/generated/android/c++/JScanOptions.hpp +87 -0
  18. package/nitrogen/generated/android/c++/JServiceDataEntry.hpp +61 -0
  19. package/nitrogen/generated/android/c++/JWriteType.hpp +58 -0
  20. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/AdvertisingDataTypes.kt +89 -0
  21. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/AdvertisingOptions.kt +47 -0
  22. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/CharacteristicValue.kt +44 -0
  23. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/GATTCharacteristic.kt +44 -0
  24. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/GATTService.kt +41 -0
  25. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/HybridMunimBluetoothSpec.kt +134 -0
  26. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MunimBluetoothOnLoad.kt +35 -0
  27. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ScanMode.kt +24 -0
  28. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ScanOptions.kt +44 -0
  29. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ServiceDataEntry.kt +41 -0
  30. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/WriteType.kt +23 -0
  31. package/nitrogen/generated/ios/MunimBluetooth+autolinking.rb +60 -0
  32. package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Bridge.cpp +97 -0
  33. package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Bridge.hpp +583 -0
  34. package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Umbrella.hpp +74 -0
  35. package/nitrogen/generated/ios/MunimBluetoothAutolinking.mm +33 -0
  36. package/nitrogen/generated/ios/MunimBluetoothAutolinking.swift +44 -0
  37. package/nitrogen/generated/ios/c++/HybridMunimBluetoothSpecSwift.cpp +11 -0
  38. package/nitrogen/generated/ios/c++/HybridMunimBluetoothSpecSwift.hpp +241 -0
  39. package/nitrogen/generated/ios/swift/AdvertisingDataTypes.swift +400 -0
  40. package/nitrogen/generated/ios/swift/AdvertisingOptions.swift +83 -0
  41. package/nitrogen/generated/ios/swift/CharacteristicValue.swift +40 -0
  42. package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
  43. package/nitrogen/generated/ios/swift/Func_void_AdvertisingDataTypes.swift +47 -0
  44. package/nitrogen/generated/ios/swift/Func_void_CharacteristicValue.swift +47 -0
  45. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  46. package/nitrogen/generated/ios/swift/Func_void_double.swift +47 -0
  47. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  48. package/nitrogen/generated/ios/swift/Func_void_std__vector_GATTService_.swift +47 -0
  49. package/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift +47 -0
  50. package/nitrogen/generated/ios/swift/GATTCharacteristic.swift +59 -0
  51. package/nitrogen/generated/ios/swift/GATTService.swift +41 -0
  52. package/nitrogen/generated/ios/swift/HybridMunimBluetoothSpec.swift +75 -0
  53. package/nitrogen/generated/ios/swift/HybridMunimBluetoothSpec_cxx.swift +431 -0
  54. package/nitrogen/generated/ios/swift/ScanMode.swift +44 -0
  55. package/nitrogen/generated/ios/swift/ScanOptions.swift +78 -0
  56. package/nitrogen/generated/ios/swift/ServiceDataEntry.swift +35 -0
  57. package/nitrogen/generated/ios/swift/WriteType.swift +40 -0
  58. package/nitrogen/generated/shared/c++/AdvertisingDataTypes.hpp +155 -0
  59. package/nitrogen/generated/shared/c++/AdvertisingOptions.hpp +99 -0
  60. package/nitrogen/generated/shared/c++/CharacteristicValue.hpp +91 -0
  61. package/nitrogen/generated/shared/c++/GATTCharacteristic.hpp +93 -0
  62. package/nitrogen/generated/shared/c++/GATTService.hpp +90 -0
  63. package/nitrogen/generated/shared/c++/HybridMunimBluetoothSpec.cpp +40 -0
  64. package/nitrogen/generated/shared/c++/HybridMunimBluetoothSpec.hpp +101 -0
  65. package/nitrogen/generated/shared/c++/ScanMode.hpp +80 -0
  66. package/nitrogen/generated/shared/c++/ScanOptions.hpp +95 -0
  67. package/nitrogen/generated/shared/c++/ServiceDataEntry.hpp +87 -0
  68. package/nitrogen/generated/shared/c++/WriteType.hpp +76 -0
  69. package/package.json +9 -9
  70. package/src/specs/munim-bluetooth.nitro.ts +34 -25
  71. package/lib/module/package.json +0 -1
@@ -0,0 +1,155 @@
1
+ ///
2
+ /// AdvertisingDataTypes.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
30
+
31
+ // Forward declaration of `ServiceDataEntry` to properly resolve imports.
32
+ namespace margelo::nitro::munimbluetooth { struct ServiceDataEntry; }
33
+
34
+ #include <optional>
35
+ #include <string>
36
+ #include <vector>
37
+ #include "ServiceDataEntry.hpp"
38
+
39
+ namespace margelo::nitro::munimbluetooth {
40
+
41
+ /**
42
+ * A struct which can be represented as a JavaScript object (AdvertisingDataTypes).
43
+ */
44
+ struct AdvertisingDataTypes final {
45
+ public:
46
+ std::optional<double> flags SWIFT_PRIVATE;
47
+ std::optional<std::vector<std::string>> incompleteServiceUUIDs16 SWIFT_PRIVATE;
48
+ std::optional<std::vector<std::string>> completeServiceUUIDs16 SWIFT_PRIVATE;
49
+ std::optional<std::vector<std::string>> incompleteServiceUUIDs32 SWIFT_PRIVATE;
50
+ std::optional<std::vector<std::string>> completeServiceUUIDs32 SWIFT_PRIVATE;
51
+ std::optional<std::vector<std::string>> incompleteServiceUUIDs128 SWIFT_PRIVATE;
52
+ std::optional<std::vector<std::string>> completeServiceUUIDs128 SWIFT_PRIVATE;
53
+ std::optional<std::string> shortenedLocalName SWIFT_PRIVATE;
54
+ std::optional<std::string> completeLocalName SWIFT_PRIVATE;
55
+ std::optional<double> txPowerLevel SWIFT_PRIVATE;
56
+ std::optional<std::vector<std::string>> serviceSolicitationUUIDs16 SWIFT_PRIVATE;
57
+ std::optional<std::vector<std::string>> serviceSolicitationUUIDs128 SWIFT_PRIVATE;
58
+ std::optional<std::vector<ServiceDataEntry>> serviceData16 SWIFT_PRIVATE;
59
+ std::optional<std::vector<ServiceDataEntry>> serviceData32 SWIFT_PRIVATE;
60
+ std::optional<std::vector<ServiceDataEntry>> serviceData128 SWIFT_PRIVATE;
61
+ std::optional<double> appearance SWIFT_PRIVATE;
62
+ std::optional<std::vector<std::string>> serviceSolicitationUUIDs32 SWIFT_PRIVATE;
63
+ std::optional<std::string> manufacturerData SWIFT_PRIVATE;
64
+
65
+ public:
66
+ AdvertisingDataTypes() = default;
67
+ explicit AdvertisingDataTypes(std::optional<double> flags, std::optional<std::vector<std::string>> incompleteServiceUUIDs16, std::optional<std::vector<std::string>> completeServiceUUIDs16, std::optional<std::vector<std::string>> incompleteServiceUUIDs32, std::optional<std::vector<std::string>> completeServiceUUIDs32, std::optional<std::vector<std::string>> incompleteServiceUUIDs128, std::optional<std::vector<std::string>> completeServiceUUIDs128, std::optional<std::string> shortenedLocalName, std::optional<std::string> completeLocalName, std::optional<double> txPowerLevel, std::optional<std::vector<std::string>> serviceSolicitationUUIDs16, std::optional<std::vector<std::string>> serviceSolicitationUUIDs128, std::optional<std::vector<ServiceDataEntry>> serviceData16, std::optional<std::vector<ServiceDataEntry>> serviceData32, std::optional<std::vector<ServiceDataEntry>> serviceData128, std::optional<double> appearance, std::optional<std::vector<std::string>> serviceSolicitationUUIDs32, std::optional<std::string> manufacturerData): flags(flags), incompleteServiceUUIDs16(incompleteServiceUUIDs16), completeServiceUUIDs16(completeServiceUUIDs16), incompleteServiceUUIDs32(incompleteServiceUUIDs32), completeServiceUUIDs32(completeServiceUUIDs32), incompleteServiceUUIDs128(incompleteServiceUUIDs128), completeServiceUUIDs128(completeServiceUUIDs128), shortenedLocalName(shortenedLocalName), completeLocalName(completeLocalName), txPowerLevel(txPowerLevel), serviceSolicitationUUIDs16(serviceSolicitationUUIDs16), serviceSolicitationUUIDs128(serviceSolicitationUUIDs128), serviceData16(serviceData16), serviceData32(serviceData32), serviceData128(serviceData128), appearance(appearance), serviceSolicitationUUIDs32(serviceSolicitationUUIDs32), manufacturerData(manufacturerData) {}
68
+
69
+ public:
70
+ friend bool operator==(const AdvertisingDataTypes& lhs, const AdvertisingDataTypes& rhs) = default;
71
+ };
72
+
73
+ } // namespace margelo::nitro::munimbluetooth
74
+
75
+ namespace margelo::nitro {
76
+
77
+ // C++ AdvertisingDataTypes <> JS AdvertisingDataTypes (object)
78
+ template <>
79
+ struct JSIConverter<margelo::nitro::munimbluetooth::AdvertisingDataTypes> final {
80
+ static inline margelo::nitro::munimbluetooth::AdvertisingDataTypes fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
81
+ jsi::Object obj = arg.asObject(runtime);
82
+ return margelo::nitro::munimbluetooth::AdvertisingDataTypes(
83
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "flags"))),
84
+ JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "incompleteServiceUUIDs16"))),
85
+ JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "completeServiceUUIDs16"))),
86
+ JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "incompleteServiceUUIDs32"))),
87
+ JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "completeServiceUUIDs32"))),
88
+ JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "incompleteServiceUUIDs128"))),
89
+ JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "completeServiceUUIDs128"))),
90
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "shortenedLocalName"))),
91
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "completeLocalName"))),
92
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "txPowerLevel"))),
93
+ JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceSolicitationUUIDs16"))),
94
+ JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceSolicitationUUIDs128"))),
95
+ JSIConverter<std::optional<std::vector<margelo::nitro::munimbluetooth::ServiceDataEntry>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceData16"))),
96
+ JSIConverter<std::optional<std::vector<margelo::nitro::munimbluetooth::ServiceDataEntry>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceData32"))),
97
+ JSIConverter<std::optional<std::vector<margelo::nitro::munimbluetooth::ServiceDataEntry>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceData128"))),
98
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "appearance"))),
99
+ JSIConverter<std::optional<std::vector<std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceSolicitationUUIDs32"))),
100
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "manufacturerData")))
101
+ );
102
+ }
103
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::munimbluetooth::AdvertisingDataTypes& arg) {
104
+ jsi::Object obj(runtime);
105
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "flags"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.flags));
106
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "incompleteServiceUUIDs16"), JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.incompleteServiceUUIDs16));
107
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "completeServiceUUIDs16"), JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.completeServiceUUIDs16));
108
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "incompleteServiceUUIDs32"), JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.incompleteServiceUUIDs32));
109
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "completeServiceUUIDs32"), JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.completeServiceUUIDs32));
110
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "incompleteServiceUUIDs128"), JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.incompleteServiceUUIDs128));
111
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "completeServiceUUIDs128"), JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.completeServiceUUIDs128));
112
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "shortenedLocalName"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.shortenedLocalName));
113
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "completeLocalName"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.completeLocalName));
114
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "txPowerLevel"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.txPowerLevel));
115
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceSolicitationUUIDs16"), JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.serviceSolicitationUUIDs16));
116
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceSolicitationUUIDs128"), JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.serviceSolicitationUUIDs128));
117
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceData16"), JSIConverter<std::optional<std::vector<margelo::nitro::munimbluetooth::ServiceDataEntry>>>::toJSI(runtime, arg.serviceData16));
118
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceData32"), JSIConverter<std::optional<std::vector<margelo::nitro::munimbluetooth::ServiceDataEntry>>>::toJSI(runtime, arg.serviceData32));
119
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceData128"), JSIConverter<std::optional<std::vector<margelo::nitro::munimbluetooth::ServiceDataEntry>>>::toJSI(runtime, arg.serviceData128));
120
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "appearance"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.appearance));
121
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceSolicitationUUIDs32"), JSIConverter<std::optional<std::vector<std::string>>>::toJSI(runtime, arg.serviceSolicitationUUIDs32));
122
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "manufacturerData"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.manufacturerData));
123
+ return obj;
124
+ }
125
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
126
+ if (!value.isObject()) {
127
+ return false;
128
+ }
129
+ jsi::Object obj = value.getObject(runtime);
130
+ if (!nitro::isPlainObject(runtime, obj)) {
131
+ return false;
132
+ }
133
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "flags")))) return false;
134
+ if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "incompleteServiceUUIDs16")))) return false;
135
+ if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "completeServiceUUIDs16")))) return false;
136
+ if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "incompleteServiceUUIDs32")))) return false;
137
+ if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "completeServiceUUIDs32")))) return false;
138
+ if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "incompleteServiceUUIDs128")))) return false;
139
+ if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "completeServiceUUIDs128")))) return false;
140
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "shortenedLocalName")))) return false;
141
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "completeLocalName")))) return false;
142
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "txPowerLevel")))) return false;
143
+ if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceSolicitationUUIDs16")))) return false;
144
+ if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceSolicitationUUIDs128")))) return false;
145
+ if (!JSIConverter<std::optional<std::vector<margelo::nitro::munimbluetooth::ServiceDataEntry>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceData16")))) return false;
146
+ if (!JSIConverter<std::optional<std::vector<margelo::nitro::munimbluetooth::ServiceDataEntry>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceData32")))) return false;
147
+ if (!JSIConverter<std::optional<std::vector<margelo::nitro::munimbluetooth::ServiceDataEntry>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceData128")))) return false;
148
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "appearance")))) return false;
149
+ if (!JSIConverter<std::optional<std::vector<std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceSolicitationUUIDs32")))) return false;
150
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "manufacturerData")))) return false;
151
+ return true;
152
+ }
153
+ };
154
+
155
+ } // namespace margelo::nitro
@@ -0,0 +1,99 @@
1
+ ///
2
+ /// AdvertisingOptions.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
30
+
31
+ // Forward declaration of `AdvertisingDataTypes` to properly resolve imports.
32
+ namespace margelo::nitro::munimbluetooth { struct AdvertisingDataTypes; }
33
+
34
+ #include <string>
35
+ #include <vector>
36
+ #include <optional>
37
+ #include "AdvertisingDataTypes.hpp"
38
+
39
+ namespace margelo::nitro::munimbluetooth {
40
+
41
+ /**
42
+ * A struct which can be represented as a JavaScript object (AdvertisingOptions).
43
+ */
44
+ struct AdvertisingOptions final {
45
+ public:
46
+ std::vector<std::string> serviceUUIDs SWIFT_PRIVATE;
47
+ std::optional<std::string> localName SWIFT_PRIVATE;
48
+ std::optional<std::string> manufacturerData SWIFT_PRIVATE;
49
+ std::optional<AdvertisingDataTypes> advertisingData SWIFT_PRIVATE;
50
+
51
+ public:
52
+ AdvertisingOptions() = default;
53
+ explicit AdvertisingOptions(std::vector<std::string> serviceUUIDs, std::optional<std::string> localName, std::optional<std::string> manufacturerData, std::optional<AdvertisingDataTypes> advertisingData): serviceUUIDs(serviceUUIDs), localName(localName), manufacturerData(manufacturerData), advertisingData(advertisingData) {}
54
+
55
+ public:
56
+ friend bool operator==(const AdvertisingOptions& lhs, const AdvertisingOptions& rhs) = default;
57
+ };
58
+
59
+ } // namespace margelo::nitro::munimbluetooth
60
+
61
+ namespace margelo::nitro {
62
+
63
+ // C++ AdvertisingOptions <> JS AdvertisingOptions (object)
64
+ template <>
65
+ struct JSIConverter<margelo::nitro::munimbluetooth::AdvertisingOptions> final {
66
+ static inline margelo::nitro::munimbluetooth::AdvertisingOptions fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
67
+ jsi::Object obj = arg.asObject(runtime);
68
+ return margelo::nitro::munimbluetooth::AdvertisingOptions(
69
+ JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceUUIDs"))),
70
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "localName"))),
71
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "manufacturerData"))),
72
+ JSIConverter<std::optional<margelo::nitro::munimbluetooth::AdvertisingDataTypes>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "advertisingData")))
73
+ );
74
+ }
75
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::munimbluetooth::AdvertisingOptions& arg) {
76
+ jsi::Object obj(runtime);
77
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceUUIDs"), JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.serviceUUIDs));
78
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "localName"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.localName));
79
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "manufacturerData"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.manufacturerData));
80
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "advertisingData"), JSIConverter<std::optional<margelo::nitro::munimbluetooth::AdvertisingDataTypes>>::toJSI(runtime, arg.advertisingData));
81
+ return obj;
82
+ }
83
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
84
+ if (!value.isObject()) {
85
+ return false;
86
+ }
87
+ jsi::Object obj = value.getObject(runtime);
88
+ if (!nitro::isPlainObject(runtime, obj)) {
89
+ return false;
90
+ }
91
+ if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceUUIDs")))) return false;
92
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "localName")))) return false;
93
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "manufacturerData")))) return false;
94
+ if (!JSIConverter<std::optional<margelo::nitro::munimbluetooth::AdvertisingDataTypes>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "advertisingData")))) return false;
95
+ return true;
96
+ }
97
+ };
98
+
99
+ } // namespace margelo::nitro
@@ -0,0 +1,91 @@
1
+ ///
2
+ /// CharacteristicValue.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
30
+
31
+
32
+
33
+ #include <string>
34
+
35
+ namespace margelo::nitro::munimbluetooth {
36
+
37
+ /**
38
+ * A struct which can be represented as a JavaScript object (CharacteristicValue).
39
+ */
40
+ struct CharacteristicValue final {
41
+ public:
42
+ std::string value SWIFT_PRIVATE;
43
+ std::string serviceUUID SWIFT_PRIVATE;
44
+ std::string characteristicUUID SWIFT_PRIVATE;
45
+
46
+ public:
47
+ CharacteristicValue() = default;
48
+ explicit CharacteristicValue(std::string value, std::string serviceUUID, std::string characteristicUUID): value(value), serviceUUID(serviceUUID), characteristicUUID(characteristicUUID) {}
49
+
50
+ public:
51
+ friend bool operator==(const CharacteristicValue& lhs, const CharacteristicValue& rhs) = default;
52
+ };
53
+
54
+ } // namespace margelo::nitro::munimbluetooth
55
+
56
+ namespace margelo::nitro {
57
+
58
+ // C++ CharacteristicValue <> JS CharacteristicValue (object)
59
+ template <>
60
+ struct JSIConverter<margelo::nitro::munimbluetooth::CharacteristicValue> final {
61
+ static inline margelo::nitro::munimbluetooth::CharacteristicValue fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
62
+ jsi::Object obj = arg.asObject(runtime);
63
+ return margelo::nitro::munimbluetooth::CharacteristicValue(
64
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "value"))),
65
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceUUID"))),
66
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "characteristicUUID")))
67
+ );
68
+ }
69
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::munimbluetooth::CharacteristicValue& arg) {
70
+ jsi::Object obj(runtime);
71
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "value"), JSIConverter<std::string>::toJSI(runtime, arg.value));
72
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceUUID"), JSIConverter<std::string>::toJSI(runtime, arg.serviceUUID));
73
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "characteristicUUID"), JSIConverter<std::string>::toJSI(runtime, arg.characteristicUUID));
74
+ return obj;
75
+ }
76
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
77
+ if (!value.isObject()) {
78
+ return false;
79
+ }
80
+ jsi::Object obj = value.getObject(runtime);
81
+ if (!nitro::isPlainObject(runtime, obj)) {
82
+ return false;
83
+ }
84
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "value")))) return false;
85
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceUUID")))) return false;
86
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "characteristicUUID")))) return false;
87
+ return true;
88
+ }
89
+ };
90
+
91
+ } // namespace margelo::nitro
@@ -0,0 +1,93 @@
1
+ ///
2
+ /// GATTCharacteristic.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
30
+
31
+
32
+
33
+ #include <string>
34
+ #include <vector>
35
+ #include <optional>
36
+
37
+ namespace margelo::nitro::munimbluetooth {
38
+
39
+ /**
40
+ * A struct which can be represented as a JavaScript object (GATTCharacteristic).
41
+ */
42
+ struct GATTCharacteristic final {
43
+ public:
44
+ std::string uuid SWIFT_PRIVATE;
45
+ std::vector<std::string> properties SWIFT_PRIVATE;
46
+ std::optional<std::string> value SWIFT_PRIVATE;
47
+
48
+ public:
49
+ GATTCharacteristic() = default;
50
+ explicit GATTCharacteristic(std::string uuid, std::vector<std::string> properties, std::optional<std::string> value): uuid(uuid), properties(properties), value(value) {}
51
+
52
+ public:
53
+ friend bool operator==(const GATTCharacteristic& lhs, const GATTCharacteristic& rhs) = default;
54
+ };
55
+
56
+ } // namespace margelo::nitro::munimbluetooth
57
+
58
+ namespace margelo::nitro {
59
+
60
+ // C++ GATTCharacteristic <> JS GATTCharacteristic (object)
61
+ template <>
62
+ struct JSIConverter<margelo::nitro::munimbluetooth::GATTCharacteristic> final {
63
+ static inline margelo::nitro::munimbluetooth::GATTCharacteristic fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
64
+ jsi::Object obj = arg.asObject(runtime);
65
+ return margelo::nitro::munimbluetooth::GATTCharacteristic(
66
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid"))),
67
+ JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "properties"))),
68
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "value")))
69
+ );
70
+ }
71
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::munimbluetooth::GATTCharacteristic& arg) {
72
+ jsi::Object obj(runtime);
73
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "uuid"), JSIConverter<std::string>::toJSI(runtime, arg.uuid));
74
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "properties"), JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.properties));
75
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "value"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.value));
76
+ return obj;
77
+ }
78
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
79
+ if (!value.isObject()) {
80
+ return false;
81
+ }
82
+ jsi::Object obj = value.getObject(runtime);
83
+ if (!nitro::isPlainObject(runtime, obj)) {
84
+ return false;
85
+ }
86
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid")))) return false;
87
+ if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "properties")))) return false;
88
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "value")))) return false;
89
+ return true;
90
+ }
91
+ };
92
+
93
+ } // namespace margelo::nitro
@@ -0,0 +1,90 @@
1
+ ///
2
+ /// GATTService.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
30
+
31
+ // Forward declaration of `GATTCharacteristic` to properly resolve imports.
32
+ namespace margelo::nitro::munimbluetooth { struct GATTCharacteristic; }
33
+
34
+ #include <string>
35
+ #include "GATTCharacteristic.hpp"
36
+ #include <vector>
37
+
38
+ namespace margelo::nitro::munimbluetooth {
39
+
40
+ /**
41
+ * A struct which can be represented as a JavaScript object (GATTService).
42
+ */
43
+ struct GATTService final {
44
+ public:
45
+ std::string uuid SWIFT_PRIVATE;
46
+ std::vector<GATTCharacteristic> characteristics SWIFT_PRIVATE;
47
+
48
+ public:
49
+ GATTService() = default;
50
+ explicit GATTService(std::string uuid, std::vector<GATTCharacteristic> characteristics): uuid(uuid), characteristics(characteristics) {}
51
+
52
+ public:
53
+ friend bool operator==(const GATTService& lhs, const GATTService& rhs) = default;
54
+ };
55
+
56
+ } // namespace margelo::nitro::munimbluetooth
57
+
58
+ namespace margelo::nitro {
59
+
60
+ // C++ GATTService <> JS GATTService (object)
61
+ template <>
62
+ struct JSIConverter<margelo::nitro::munimbluetooth::GATTService> final {
63
+ static inline margelo::nitro::munimbluetooth::GATTService fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
64
+ jsi::Object obj = arg.asObject(runtime);
65
+ return margelo::nitro::munimbluetooth::GATTService(
66
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid"))),
67
+ JSIConverter<std::vector<margelo::nitro::munimbluetooth::GATTCharacteristic>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "characteristics")))
68
+ );
69
+ }
70
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::munimbluetooth::GATTService& arg) {
71
+ jsi::Object obj(runtime);
72
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "uuid"), JSIConverter<std::string>::toJSI(runtime, arg.uuid));
73
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "characteristics"), JSIConverter<std::vector<margelo::nitro::munimbluetooth::GATTCharacteristic>>::toJSI(runtime, arg.characteristics));
74
+ return obj;
75
+ }
76
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
77
+ if (!value.isObject()) {
78
+ return false;
79
+ }
80
+ jsi::Object obj = value.getObject(runtime);
81
+ if (!nitro::isPlainObject(runtime, obj)) {
82
+ return false;
83
+ }
84
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid")))) return false;
85
+ if (!JSIConverter<std::vector<margelo::nitro::munimbluetooth::GATTCharacteristic>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "characteristics")))) return false;
86
+ return true;
87
+ }
88
+ };
89
+
90
+ } // namespace margelo::nitro
@@ -0,0 +1,40 @@
1
+ ///
2
+ /// HybridMunimBluetoothSpec.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include "HybridMunimBluetoothSpec.hpp"
9
+
10
+ namespace margelo::nitro::munimbluetooth {
11
+
12
+ void HybridMunimBluetoothSpec::loadHybridMethods() {
13
+ // load base methods/properties
14
+ HybridObject::loadHybridMethods();
15
+ // load custom methods/properties
16
+ registerHybrids(this, [](Prototype& prototype) {
17
+ prototype.registerHybridMethod("startAdvertising", &HybridMunimBluetoothSpec::startAdvertising);
18
+ prototype.registerHybridMethod("updateAdvertisingData", &HybridMunimBluetoothSpec::updateAdvertisingData);
19
+ prototype.registerHybridMethod("getAdvertisingData", &HybridMunimBluetoothSpec::getAdvertisingData);
20
+ prototype.registerHybridMethod("stopAdvertising", &HybridMunimBluetoothSpec::stopAdvertising);
21
+ prototype.registerHybridMethod("setServices", &HybridMunimBluetoothSpec::setServices);
22
+ prototype.registerHybridMethod("isBluetoothEnabled", &HybridMunimBluetoothSpec::isBluetoothEnabled);
23
+ prototype.registerHybridMethod("requestBluetoothPermission", &HybridMunimBluetoothSpec::requestBluetoothPermission);
24
+ prototype.registerHybridMethod("startScan", &HybridMunimBluetoothSpec::startScan);
25
+ prototype.registerHybridMethod("stopScan", &HybridMunimBluetoothSpec::stopScan);
26
+ prototype.registerHybridMethod("connect", &HybridMunimBluetoothSpec::connect);
27
+ prototype.registerHybridMethod("disconnect", &HybridMunimBluetoothSpec::disconnect);
28
+ prototype.registerHybridMethod("discoverServices", &HybridMunimBluetoothSpec::discoverServices);
29
+ prototype.registerHybridMethod("readCharacteristic", &HybridMunimBluetoothSpec::readCharacteristic);
30
+ prototype.registerHybridMethod("writeCharacteristic", &HybridMunimBluetoothSpec::writeCharacteristic);
31
+ prototype.registerHybridMethod("subscribeToCharacteristic", &HybridMunimBluetoothSpec::subscribeToCharacteristic);
32
+ prototype.registerHybridMethod("unsubscribeFromCharacteristic", &HybridMunimBluetoothSpec::unsubscribeFromCharacteristic);
33
+ prototype.registerHybridMethod("getConnectedDevices", &HybridMunimBluetoothSpec::getConnectedDevices);
34
+ prototype.registerHybridMethod("readRSSI", &HybridMunimBluetoothSpec::readRSSI);
35
+ prototype.registerHybridMethod("addListener", &HybridMunimBluetoothSpec::addListener);
36
+ prototype.registerHybridMethod("removeListeners", &HybridMunimBluetoothSpec::removeListeners);
37
+ });
38
+ }
39
+
40
+ } // namespace margelo::nitro::munimbluetooth