munim-bluetooth 0.3.27 → 0.4.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 (115) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +476 -74
  3. package/android/gradle.properties +2 -2
  4. package/android/src/main/AndroidManifest.xml +3 -1
  5. package/android/src/main/cpp/cpp-adapter.cpp +4 -1
  6. package/android/src/main/java/com/munimbluetooth/HybridMunimBluetooth.kt +2006 -209
  7. package/android/src/main/java/com/munimbluetooth/MunimBluetoothBackgroundService.kt +561 -53
  8. package/app.plugin.js +155 -0
  9. package/ios/HybridMunimBluetooth.swift +2123 -298
  10. package/ios/MunimBluetoothEventEmitter.swift +68 -8
  11. package/lib/commonjs/index.js +272 -11
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/module/index.js +243 -11
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/typescript/src/index.d.ts +310 -7
  16. package/lib/typescript/src/index.d.ts.map +1 -1
  17. package/lib/typescript/src/specs/munim-bluetooth.nitro.d.ts +219 -5
  18. package/lib/typescript/src/specs/munim-bluetooth.nitro.d.ts.map +1 -1
  19. package/nitro.json +9 -3
  20. package/nitrogen/generated/android/c++/JAdvertisingDataTypes.hpp +96 -96
  21. package/nitrogen/generated/android/c++/JAdvertisingOptions.hpp +8 -8
  22. package/nitrogen/generated/android/c++/JBackgroundSessionOptions.hpp +8 -8
  23. package/nitrogen/generated/android/c++/JBluetoothCapabilities.hpp +105 -0
  24. package/nitrogen/generated/android/c++/JBluetoothPhy.hpp +61 -0
  25. package/nitrogen/generated/android/c++/JBluetoothPhyOption.hpp +61 -0
  26. package/nitrogen/generated/android/c++/JBondState.hpp +64 -0
  27. package/nitrogen/generated/android/c++/JDescriptorValue.hpp +69 -0
  28. package/nitrogen/generated/android/c++/JExtendedAdvertisingOptions.hpp +131 -0
  29. package/nitrogen/generated/android/c++/JGATTCharacteristic.hpp +35 -11
  30. package/nitrogen/generated/android/c++/JGATTDescriptor.hpp +85 -0
  31. package/nitrogen/generated/android/c++/JGATTService.hpp +33 -9
  32. package/nitrogen/generated/android/c++/JHybridMunimBluetoothSpec.cpp +422 -12
  33. package/nitrogen/generated/android/c++/JHybridMunimBluetoothSpec.hpp +29 -0
  34. package/nitrogen/generated/android/c++/JL2CAPChannel.hpp +66 -0
  35. package/nitrogen/generated/android/c++/JMultipeerDiscoveryInfoEntry.hpp +61 -0
  36. package/nitrogen/generated/android/c++/JMultipeerEncryptionPreference.hpp +61 -0
  37. package/nitrogen/generated/android/c++/JMultipeerPeer.hpp +93 -0
  38. package/nitrogen/generated/android/c++/JMultipeerPeerState.hpp +61 -0
  39. package/nitrogen/generated/android/c++/JMultipeerSessionOptions.hpp +105 -0
  40. package/nitrogen/generated/android/c++/JPhyStatus.hpp +62 -0
  41. package/nitrogen/generated/android/c++/JScanOptions.hpp +8 -8
  42. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/AdvertisingDataTypes.kt +47 -0
  43. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/AdvertisingOptions.kt +19 -0
  44. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/BackgroundSessionOptions.kt +27 -0
  45. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/BluetoothCapabilities.kt +111 -0
  46. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/BluetoothPhy.kt +24 -0
  47. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/BluetoothPhyOption.kt +24 -0
  48. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/BondState.kt +25 -0
  49. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/CharacteristicValue.kt +17 -0
  50. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/DescriptorValue.kt +66 -0
  51. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ExtendedAdvertisingOptions.kt +111 -0
  52. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/GATTCharacteristic.kt +25 -3
  53. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/GATTDescriptor.kt +61 -0
  54. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/GATTService.kt +23 -3
  55. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/HybridMunimBluetoothSpec.kt +138 -22
  56. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/L2CAPChannel.kt +61 -0
  57. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MultipeerDiscoveryInfoEntry.kt +56 -0
  58. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MultipeerEncryptionPreference.kt +24 -0
  59. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MultipeerPeer.kt +66 -0
  60. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MultipeerPeerState.kt +24 -0
  61. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/MultipeerSessionOptions.kt +81 -0
  62. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/PhyStatus.kt +56 -0
  63. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ScanOptions.kt +17 -0
  64. package/nitrogen/generated/android/kotlin/com/margelo/nitro/munimbluetooth/ServiceDataEntry.kt +15 -0
  65. package/nitrogen/generated/ios/MunimBluetooth+autolinking.rb +2 -0
  66. package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Bridge.cpp +61 -5
  67. package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Bridge.hpp +494 -49
  68. package/nitrogen/generated/ios/MunimBluetooth-Swift-Cxx-Umbrella.hpp +42 -0
  69. package/nitrogen/generated/ios/c++/HybridMunimBluetoothSpecSwift.hpp +254 -0
  70. package/nitrogen/generated/ios/swift/BluetoothCapabilities.swift +89 -0
  71. package/nitrogen/generated/ios/swift/BluetoothPhy.swift +44 -0
  72. package/nitrogen/generated/ios/swift/BluetoothPhyOption.swift +44 -0
  73. package/nitrogen/generated/ios/swift/BondState.swift +48 -0
  74. package/nitrogen/generated/ios/swift/DescriptorValue.swift +44 -0
  75. package/nitrogen/generated/ios/swift/ExtendedAdvertisingOptions.swift +243 -0
  76. package/nitrogen/generated/ios/swift/Func_void_BluetoothCapabilities.swift +46 -0
  77. package/nitrogen/generated/ios/swift/Func_void_BondState.swift +46 -0
  78. package/nitrogen/generated/ios/swift/Func_void_DescriptorValue.swift +46 -0
  79. package/nitrogen/generated/ios/swift/Func_void_L2CAPChannel.swift +46 -0
  80. package/nitrogen/generated/ios/swift/Func_void_PhyStatus.swift +46 -0
  81. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
  82. package/nitrogen/generated/ios/swift/Func_void_std__vector_MultipeerPeer_.swift +46 -0
  83. package/nitrogen/generated/ios/swift/GATTCharacteristic.swift +25 -1
  84. package/nitrogen/generated/ios/swift/GATTDescriptor.swift +71 -0
  85. package/nitrogen/generated/ios/swift/GATTService.swift +25 -1
  86. package/nitrogen/generated/ios/swift/HybridMunimBluetoothSpec.swift +29 -0
  87. package/nitrogen/generated/ios/swift/HybridMunimBluetoothSpec_cxx.swift +556 -23
  88. package/nitrogen/generated/ios/swift/L2CAPChannel.swift +52 -0
  89. package/nitrogen/generated/ios/swift/MultipeerDiscoveryInfoEntry.swift +34 -0
  90. package/nitrogen/generated/ios/swift/MultipeerEncryptionPreference.swift +44 -0
  91. package/nitrogen/generated/ios/swift/MultipeerPeer.swift +63 -0
  92. package/nitrogen/generated/ios/swift/MultipeerPeerState.swift +44 -0
  93. package/nitrogen/generated/ios/swift/MultipeerSessionOptions.swift +136 -0
  94. package/nitrogen/generated/ios/swift/PhyStatus.swift +34 -0
  95. package/nitrogen/generated/shared/c++/BluetoothCapabilities.hpp +131 -0
  96. package/nitrogen/generated/shared/c++/BluetoothPhy.hpp +80 -0
  97. package/nitrogen/generated/shared/c++/BluetoothPhyOption.hpp +80 -0
  98. package/nitrogen/generated/shared/c++/BondState.hpp +84 -0
  99. package/nitrogen/generated/shared/c++/DescriptorValue.hpp +95 -0
  100. package/nitrogen/generated/shared/c++/ExtendedAdvertisingOptions.hpp +138 -0
  101. package/nitrogen/generated/shared/c++/GATTCharacteristic.hpp +9 -3
  102. package/nitrogen/generated/shared/c++/GATTDescriptor.hpp +93 -0
  103. package/nitrogen/generated/shared/c++/GATTService.hpp +7 -2
  104. package/nitrogen/generated/shared/c++/HybridMunimBluetoothSpec.cpp +29 -0
  105. package/nitrogen/generated/shared/c++/HybridMunimBluetoothSpec.hpp +61 -2
  106. package/nitrogen/generated/shared/c++/L2CAPChannel.hpp +92 -0
  107. package/nitrogen/generated/shared/c++/MultipeerDiscoveryInfoEntry.hpp +87 -0
  108. package/nitrogen/generated/shared/c++/MultipeerEncryptionPreference.hpp +80 -0
  109. package/nitrogen/generated/shared/c++/MultipeerPeer.hpp +102 -0
  110. package/nitrogen/generated/shared/c++/MultipeerPeerState.hpp +80 -0
  111. package/nitrogen/generated/shared/c++/MultipeerSessionOptions.hpp +114 -0
  112. package/nitrogen/generated/shared/c++/PhyStatus.hpp +88 -0
  113. package/package.json +22 -11
  114. package/src/index.ts +416 -31
  115. package/src/specs/munim-bluetooth.nitro.ts +298 -14
@@ -30,6 +30,14 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
30
30
  };
31
31
  }
32
32
 
33
+ // pragma MARK: std::function<void()>
34
+ Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept {
35
+ auto swiftClosure = MunimBluetooth::Func_void::fromUnsafe(swiftClosureWrapper);
36
+ return [swiftClosure = std::move(swiftClosure)]() mutable -> void {
37
+ swiftClosure.call();
38
+ };
39
+ }
40
+
33
41
  // pragma MARK: std::function<void(bool /* result */)>
34
42
  Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
35
43
  auto swiftClosure = MunimBluetooth::Func_void_bool::fromUnsafe(swiftClosureWrapper);
@@ -38,11 +46,11 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
38
46
  };
39
47
  }
40
48
 
41
- // pragma MARK: std::function<void()>
42
- Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept {
43
- auto swiftClosure = MunimBluetooth::Func_void::fromUnsafe(swiftClosureWrapper);
44
- return [swiftClosure = std::move(swiftClosure)]() mutable -> void {
45
- swiftClosure.call();
49
+ // pragma MARK: std::function<void(const BluetoothCapabilities& /* result */)>
50
+ Func_void_BluetoothCapabilities create_Func_void_BluetoothCapabilities(void* NON_NULL swiftClosureWrapper) noexcept {
51
+ auto swiftClosure = MunimBluetooth::Func_void_BluetoothCapabilities::fromUnsafe(swiftClosureWrapper);
52
+ return [swiftClosure = std::move(swiftClosure)](const BluetoothCapabilities& result) mutable -> void {
53
+ swiftClosure.call(result);
46
54
  };
47
55
  }
48
56
 
@@ -62,6 +70,14 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
62
70
  };
63
71
  }
64
72
 
73
+ // pragma MARK: std::function<void(const DescriptorValue& /* result */)>
74
+ Func_void_DescriptorValue create_Func_void_DescriptorValue(void* NON_NULL swiftClosureWrapper) noexcept {
75
+ auto swiftClosure = MunimBluetooth::Func_void_DescriptorValue::fromUnsafe(swiftClosureWrapper);
76
+ return [swiftClosure = std::move(swiftClosure)](const DescriptorValue& result) mutable -> void {
77
+ swiftClosure.call(result);
78
+ };
79
+ }
80
+
65
81
  // pragma MARK: std::function<void(const std::vector<std::string>& /* result */)>
66
82
  Func_void_std__vector_std__string_ create_Func_void_std__vector_std__string_(void* NON_NULL swiftClosureWrapper) noexcept {
67
83
  auto swiftClosure = MunimBluetooth::Func_void_std__vector_std__string_::fromUnsafe(swiftClosureWrapper);
@@ -78,6 +94,46 @@ namespace margelo::nitro::munimbluetooth::bridge::swift {
78
94
  };
79
95
  }
80
96
 
97
+ // pragma MARK: std::function<void(const PhyStatus& /* result */)>
98
+ Func_void_PhyStatus create_Func_void_PhyStatus(void* NON_NULL swiftClosureWrapper) noexcept {
99
+ auto swiftClosure = MunimBluetooth::Func_void_PhyStatus::fromUnsafe(swiftClosureWrapper);
100
+ return [swiftClosure = std::move(swiftClosure)](const PhyStatus& result) mutable -> void {
101
+ swiftClosure.call(result);
102
+ };
103
+ }
104
+
105
+ // pragma MARK: std::function<void(BondState /* result */)>
106
+ Func_void_BondState create_Func_void_BondState(void* NON_NULL swiftClosureWrapper) noexcept {
107
+ auto swiftClosure = MunimBluetooth::Func_void_BondState::fromUnsafe(swiftClosureWrapper);
108
+ return [swiftClosure = std::move(swiftClosure)](BondState result) mutable -> void {
109
+ swiftClosure.call(static_cast<int>(result));
110
+ };
111
+ }
112
+
113
+ // pragma MARK: std::function<void(const std::string& /* result */)>
114
+ Func_void_std__string create_Func_void_std__string(void* NON_NULL swiftClosureWrapper) noexcept {
115
+ auto swiftClosure = MunimBluetooth::Func_void_std__string::fromUnsafe(swiftClosureWrapper);
116
+ return [swiftClosure = std::move(swiftClosure)](const std::string& result) mutable -> void {
117
+ swiftClosure.call(result);
118
+ };
119
+ }
120
+
121
+ // pragma MARK: std::function<void(const L2CAPChannel& /* result */)>
122
+ Func_void_L2CAPChannel create_Func_void_L2CAPChannel(void* NON_NULL swiftClosureWrapper) noexcept {
123
+ auto swiftClosure = MunimBluetooth::Func_void_L2CAPChannel::fromUnsafe(swiftClosureWrapper);
124
+ return [swiftClosure = std::move(swiftClosure)](const L2CAPChannel& result) mutable -> void {
125
+ swiftClosure.call(result);
126
+ };
127
+ }
128
+
129
+ // pragma MARK: std::function<void(const std::vector<MultipeerPeer>& /* result */)>
130
+ Func_void_std__vector_MultipeerPeer_ create_Func_void_std__vector_MultipeerPeer_(void* NON_NULL swiftClosureWrapper) noexcept {
131
+ auto swiftClosure = MunimBluetooth::Func_void_std__vector_MultipeerPeer_::fromUnsafe(swiftClosureWrapper);
132
+ return [swiftClosure = std::move(swiftClosure)](const std::vector<MultipeerPeer>& result) mutable -> void {
133
+ swiftClosure.call(result);
134
+ };
135
+ }
136
+
81
137
  // pragma MARK: std::shared_ptr<HybridMunimBluetoothSpec>
82
138
  std::shared_ptr<HybridMunimBluetoothSpec> create_std__shared_ptr_HybridMunimBluetoothSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
83
139
  MunimBluetooth::HybridMunimBluetoothSpec_cxx swiftPart = MunimBluetooth::HybridMunimBluetoothSpec_cxx::fromUnsafe(swiftUnsafePointer);