react-native-ble-nitro 1.9.2 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/ios/BleNitroBleManager.swift +2 -2
- package/lib/commonjs/manager.d.ts +1 -0
- package/lib/commonjs/manager.d.ts.map +1 -1
- package/lib/commonjs/manager.js +2 -0
- package/lib/commonjs/manager.js.map +1 -1
- package/lib/manager.d.ts +1 -0
- package/lib/manager.js +1 -0
- package/nitrogen/generated/android/BleNitro+autolinking.cmake +3 -1
- package/nitrogen/generated/android/BleNitro+autolinking.gradle +1 -1
- package/nitrogen/generated/android/BleNitroOnLoad.cpp +3 -3
- package/nitrogen/generated/android/BleNitroOnLoad.hpp +1 -1
- package/nitrogen/generated/android/c++/JAndroidScanMode.hpp +5 -6
- package/nitrogen/generated/android/c++/JBLEDevice.hpp +8 -4
- package/nitrogen/generated/android/c++/JBLEState.hpp +7 -8
- package/nitrogen/generated/android/c++/JFunc_void_BLEState.hpp +3 -2
- package/nitrogen/generated/android/c++/JFunc_void_bool_double_std__string.hpp +3 -2
- package/nitrogen/generated/android/c++/JFunc_void_bool_std__shared_ptr_ArrayBuffer__std__string.hpp +3 -3
- package/nitrogen/generated/android/c++/JFunc_void_bool_std__string.hpp +3 -2
- package/nitrogen/generated/android/c++/JFunc_void_bool_std__string_std__string.hpp +3 -2
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_std__variant_nitro__NullType__BLEDevice___std__optional_std__variant_nitro__NullType__std__string__.hpp +91 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string_bool_std__string.hpp +3 -2
- package/nitrogen/generated/android/c++/JFunc_void_std__string_std__shared_ptr_ArrayBuffer_.hpp +3 -3
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_BLEDevice_.hpp +5 -4
- package/nitrogen/generated/android/c++/JHybridNativeBleNitroFactorySpec.cpp +15 -4
- package/nitrogen/generated/android/c++/JHybridNativeBleNitroFactorySpec.hpp +3 -1
- package/nitrogen/generated/android/c++/JHybridNativeBleNitroSpec.cpp +27 -9
- package/nitrogen/generated/android/c++/JHybridNativeBleNitroSpec.hpp +4 -2
- package/nitrogen/generated/android/c++/JManufacturerData.hpp +8 -4
- package/nitrogen/generated/android/c++/JManufacturerDataEntry.hpp +6 -3
- package/nitrogen/generated/android/c++/JOperationResult.hpp +6 -2
- package/nitrogen/generated/android/c++/JScanFilter.hpp +8 -3
- package/nitrogen/generated/android/c++/JVariant_NullType_BLEDevice.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_BLEDevice.hpp +79 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_String.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_String.hpp +70 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/AndroidScanMode.kt +3 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/BLEDevice.kt +34 -25
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/BLEState.kt +3 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/BleNitroOnLoad.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Func_void_BLEState.kt +1 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Func_void_bool_double_std__string.kt +1 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Func_void_bool_std__shared_ptr_ArrayBuffer__std__string.kt +2 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Func_void_bool_std__string.kt +1 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Func_void_bool_std__string_std__string.kt +1 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/{Func_void_std__optional_BLEDevice__std__optional_std__string_.kt → Func_void_std__optional_std__variant_nitro__NullType__BLEDevice___std__optional_std__variant_nitro__NullType__std__string__.kt} +11 -12
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Func_void_std__string_bool_std__string.kt +1 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Func_void_std__string_std__shared_ptr_ArrayBuffer_.kt +2 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Func_void_std__vector_BLEDevice_.kt +1 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/HybridNativeBleNitroFactorySpec.kt +8 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/HybridNativeBleNitroSpec.kt +13 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/ManufacturerData.kt +16 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/ManufacturerDataEntry.kt +20 -11
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/OperationResult.kt +19 -10
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/ScanFilter.kt +25 -16
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Variant_NullType_BLEDevice.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Variant_NullType_String.kt +59 -0
- package/nitrogen/generated/ios/BleNitro+autolinking.rb +2 -2
- package/nitrogen/generated/ios/BleNitro-Swift-Cxx-Bridge.cpp +6 -5
- package/nitrogen/generated/ios/BleNitro-Swift-Cxx-Bridge.hpp +99 -27
- package/nitrogen/generated/ios/BleNitro-Swift-Cxx-Umbrella.hpp +3 -3
- package/nitrogen/generated/ios/BleNitroAutolinking.mm +1 -1
- package/nitrogen/generated/ios/BleNitroAutolinking.swift +13 -15
- package/nitrogen/generated/ios/c++/HybridNativeBleNitroFactorySpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridNativeBleNitroFactorySpecSwift.hpp +10 -3
- package/nitrogen/generated/ios/c++/HybridNativeBleNitroSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridNativeBleNitroSpecSwift.hpp +13 -4
- package/nitrogen/generated/ios/swift/AndroidScanMode.swift +1 -1
- package/nitrogen/generated/ios/swift/BLEDevice.swift +15 -63
- package/nitrogen/generated/ios/swift/BLEState.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_BLEState.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_bool_double_std__string.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_bool_std__shared_ptr_ArrayBuffer__std__string.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_bool_std__string.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_bool_std__string_std__string.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__variant_nitro__NullType__BLEDevice___std__optional_std__variant_nitro__NullType__std__string__.swift +84 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string_bool_std__string.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__string_std__shared_ptr_ArrayBuffer_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_BLEDevice_.swift +1 -2
- package/nitrogen/generated/ios/swift/HybridNativeBleNitroFactorySpec.swift +10 -4
- package/nitrogen/generated/ios/swift/HybridNativeBleNitroFactorySpec_cxx.swift +18 -3
- package/nitrogen/generated/ios/swift/HybridNativeBleNitroSpec.swift +11 -5
- package/nitrogen/generated/ios/swift/HybridNativeBleNitroSpec_cxx.swift +48 -12
- package/nitrogen/generated/ios/swift/ManufacturerData.swift +3 -15
- package/nitrogen/generated/ios/swift/ManufacturerDataEntry.swift +5 -17
- package/nitrogen/generated/ios/swift/OperationResult.swift +12 -30
- package/nitrogen/generated/ios/swift/ScanFilter.swift +9 -39
- package/nitrogen/generated/ios/swift/Variant_NullType_BLEDevice.swift +18 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_String.swift +18 -0
- package/nitrogen/generated/shared/c++/AndroidScanMode.hpp +1 -1
- package/nitrogen/generated/shared/c++/BLEDevice.hpp +31 -23
- package/nitrogen/generated/shared/c++/BLEState.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNativeBleNitroFactorySpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNativeBleNitroFactorySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNativeBleNitroSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNativeBleNitroSpec.hpp +4 -4
- package/nitrogen/generated/shared/c++/ManufacturerData.hpp +13 -5
- package/nitrogen/generated/shared/c++/ManufacturerDataEntry.hpp +17 -10
- package/nitrogen/generated/shared/c++/OperationResult.hpp +16 -8
- package/nitrogen/generated/shared/c++/ScanFilter.hpp +22 -14
- package/package.json +10 -10
- package/src/manager.ts +2 -1
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_BLEDevice__std__optional_std__string_.hpp +0 -86
- package/nitrogen/generated/ios/swift/Func_void_std__optional_BLEDevice__std__optional_std__string_.swift +0 -54
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
/// BLEDevice.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
-
import com.margelo.nitro.core.*
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -17,31 +16,41 @@ import com.margelo.nitro.core.*
|
|
|
17
16
|
*/
|
|
18
17
|
@DoNotStrip
|
|
19
18
|
@Keep
|
|
20
|
-
data class BLEDevice
|
|
19
|
+
data class BLEDevice(
|
|
21
20
|
@DoNotStrip
|
|
22
21
|
@Keep
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
22
|
+
val id: String,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val name: String,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val rssi: Double,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val manufacturerData: ManufacturerData,
|
|
32
|
+
@DoNotStrip
|
|
33
|
+
@Keep
|
|
34
|
+
val serviceUUIDs: Array<String>,
|
|
35
|
+
@DoNotStrip
|
|
36
|
+
@Keep
|
|
37
|
+
val isConnectable: Boolean,
|
|
38
|
+
@DoNotStrip
|
|
39
|
+
@Keep
|
|
40
|
+
val isConnected: Boolean
|
|
41
|
+
) {
|
|
42
|
+
/* primary constructor */
|
|
43
|
+
|
|
44
|
+
companion object {
|
|
45
|
+
/**
|
|
46
|
+
* Constructor called from C++
|
|
47
|
+
*/
|
|
42
48
|
@DoNotStrip
|
|
43
49
|
@Keep
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
@Suppress("unused")
|
|
51
|
+
@JvmStatic
|
|
52
|
+
private fun fromCpp(id: String, name: String, rssi: Double, manufacturerData: ManufacturerData, serviceUUIDs: Array<String>, isConnectable: Boolean, isConnected: Boolean): BLEDevice {
|
|
53
|
+
return BLEDevice(id, name, rssi, manufacturerData, serviceUUIDs, isConnectable, isConnected)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
47
56
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// BLEState.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -22,4 +22,6 @@ enum class BLEState(@DoNotStrip @Keep val value: Int) {
|
|
|
22
22
|
UNAUTHORIZED(3),
|
|
23
23
|
POWEREDOFF(4),
|
|
24
24
|
POWEREDON(5);
|
|
25
|
+
|
|
26
|
+
companion object
|
|
25
27
|
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/Func_void_BLEState.kt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_BLEState.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,7 +10,6 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core.*
|
|
14
13
|
import dalvik.annotation.optimization.FastNative
|
|
15
14
|
|
|
16
15
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_bool_double_std__string.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,7 +10,6 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core.*
|
|
14
13
|
import dalvik.annotation.optimization.FastNative
|
|
15
14
|
|
|
16
15
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_bool_std__shared_ptr_ArrayBuffer__std__string.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,9 +10,8 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core.*
|
|
14
13
|
import dalvik.annotation.optimization.FastNative
|
|
15
|
-
|
|
14
|
+
import com.margelo.nitro.core.ArrayBuffer
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Represents the JavaScript callback `(success: boolean, data: array-buffer, error: string) => void`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_bool_std__string.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,7 +10,6 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core.*
|
|
14
13
|
import dalvik.annotation.optimization.FastNative
|
|
15
14
|
|
|
16
15
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_bool_std__string_std__string.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,7 +10,6 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core.*
|
|
14
13
|
import dalvik.annotation.optimization.FastNative
|
|
15
14
|
|
|
16
15
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// Func_void_std__optional_std__variant_nitro__NullType__BLEDevice___std__optional_std__variant_nitro__NullType__std__string__.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,9 +10,8 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core.*
|
|
14
13
|
import dalvik.annotation.optimization.FastNative
|
|
15
|
-
|
|
14
|
+
import com.margelo.nitro.core.NullType
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Represents the JavaScript callback `(device: optional, error: optional) => void`.
|
|
@@ -22,14 +21,14 @@ import dalvik.annotation.optimization.FastNative
|
|
|
22
21
|
@DoNotStrip
|
|
23
22
|
@Keep
|
|
24
23
|
@Suppress("ClassName", "RedundantUnitReturnType")
|
|
25
|
-
fun interface
|
|
24
|
+
fun interface Func_void_std__optional_std__variant_nitro__NullType__BLEDevice___std__optional_std__variant_nitro__NullType__std__string__: (Variant_NullType_BLEDevice?, Variant_NullType_String?) -> Unit {
|
|
26
25
|
/**
|
|
27
26
|
* Call the given JS callback.
|
|
28
27
|
* @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
|
|
29
28
|
*/
|
|
30
29
|
@DoNotStrip
|
|
31
30
|
@Keep
|
|
32
|
-
override fun invoke(device:
|
|
31
|
+
override fun invoke(device: Variant_NullType_BLEDevice?, error: Variant_NullType_String?): Unit
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
/**
|
|
@@ -44,7 +43,7 @@ fun interface Func_void_std__optional_BLEDevice__std__optional_std__string_: (BL
|
|
|
44
43
|
"RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
|
|
45
44
|
"ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
|
|
46
45
|
)
|
|
47
|
-
class
|
|
46
|
+
class Func_void_std__optional_std__variant_nitro__NullType__BLEDevice___std__optional_std__variant_nitro__NullType__std__string___cxx: Func_void_std__optional_std__variant_nitro__NullType__BLEDevice___std__optional_std__variant_nitro__NullType__std__string__ {
|
|
48
47
|
@DoNotStrip
|
|
49
48
|
@Keep
|
|
50
49
|
private val mHybridData: HybridData
|
|
@@ -57,25 +56,25 @@ class Func_void_std__optional_BLEDevice__std__optional_std__string__cxx: Func_vo
|
|
|
57
56
|
|
|
58
57
|
@DoNotStrip
|
|
59
58
|
@Keep
|
|
60
|
-
override fun invoke(device:
|
|
59
|
+
override fun invoke(device: Variant_NullType_BLEDevice?, error: Variant_NullType_String?): Unit
|
|
61
60
|
= invoke_cxx(device,error)
|
|
62
61
|
|
|
63
62
|
@FastNative
|
|
64
|
-
private external fun invoke_cxx(device:
|
|
63
|
+
private external fun invoke_cxx(device: Variant_NullType_BLEDevice?, error: Variant_NullType_String?): Unit
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
/**
|
|
68
67
|
* Represents the JavaScript callback `(device: optional, error: optional) => void`.
|
|
69
|
-
* This is implemented in Java/Kotlin, via a `(
|
|
68
|
+
* This is implemented in Java/Kotlin, via a `(Variant_NullType_BLEDevice?, Variant_NullType_String?) -> Unit`.
|
|
70
69
|
* The callback is always coming from native.
|
|
71
70
|
*/
|
|
72
71
|
@DoNotStrip
|
|
73
72
|
@Keep
|
|
74
73
|
@Suppress("ClassName", "RedundantUnitReturnType", "unused")
|
|
75
|
-
class
|
|
74
|
+
class Func_void_std__optional_std__variant_nitro__NullType__BLEDevice___std__optional_std__variant_nitro__NullType__std__string___java(private val function: (Variant_NullType_BLEDevice?, Variant_NullType_String?) -> Unit): Func_void_std__optional_std__variant_nitro__NullType__BLEDevice___std__optional_std__variant_nitro__NullType__std__string__ {
|
|
76
75
|
@DoNotStrip
|
|
77
76
|
@Keep
|
|
78
|
-
override fun invoke(device:
|
|
77
|
+
override fun invoke(device: Variant_NullType_BLEDevice?, error: Variant_NullType_String?): Unit {
|
|
79
78
|
return this.function(device, error)
|
|
80
79
|
}
|
|
81
80
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_std__string_bool_std__string.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,7 +10,6 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core.*
|
|
14
13
|
import dalvik.annotation.optimization.FastNative
|
|
15
14
|
|
|
16
15
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_std__string_std__shared_ptr_ArrayBuffer_.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,9 +10,8 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core.*
|
|
14
13
|
import dalvik.annotation.optimization.FastNative
|
|
15
|
-
|
|
14
|
+
import com.margelo.nitro.core.ArrayBuffer
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Represents the JavaScript callback `(characteristicId: string, data: array-buffer) => void`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Func_void_std__vector_BLEDevice_.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,7 +10,6 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core.*
|
|
14
13
|
import dalvik.annotation.optimization.FastNative
|
|
15
14
|
|
|
16
15
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridNativeBleNitroFactorySpec.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,7 +10,7 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core
|
|
13
|
+
import com.margelo.nitro.core.HybridObject
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* A Kotlin class representing the NativeBleNitroFactory HybridObject.
|
|
@@ -36,6 +36,11 @@ abstract class HybridNativeBleNitroFactorySpec: HybridObject() {
|
|
|
36
36
|
super.updateNative(hybridData)
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
// Default implementation of `HybridObject.toString()`
|
|
40
|
+
override fun toString(): String {
|
|
41
|
+
return "[HybridObject NativeBleNitroFactory]"
|
|
42
|
+
}
|
|
43
|
+
|
|
39
44
|
// Properties
|
|
40
45
|
|
|
41
46
|
|
|
@@ -52,6 +57,6 @@ abstract class HybridNativeBleNitroFactorySpec: HybridObject() {
|
|
|
52
57
|
private external fun initHybrid(): HybridData
|
|
53
58
|
|
|
54
59
|
companion object {
|
|
55
|
-
|
|
60
|
+
protected const val TAG = "HybridNativeBleNitroFactorySpec"
|
|
56
61
|
}
|
|
57
62
|
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/HybridNativeBleNitroSpec.kt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridNativeBleNitroSpec.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
@@ -10,7 +10,10 @@ package com.margelo.nitro.co.zyke.ble
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core
|
|
13
|
+
import com.margelo.nitro.core.NullType
|
|
14
|
+
import com.margelo.nitro.core.ArrayBuffer
|
|
15
|
+
import com.margelo.nitro.core.Promise
|
|
16
|
+
import com.margelo.nitro.core.HybridObject
|
|
14
17
|
|
|
15
18
|
/**
|
|
16
19
|
* A Kotlin class representing the NativeBleNitro HybridObject.
|
|
@@ -36,6 +39,11 @@ abstract class HybridNativeBleNitroSpec: HybridObject() {
|
|
|
36
39
|
super.updateNative(hybridData)
|
|
37
40
|
}
|
|
38
41
|
|
|
42
|
+
// Default implementation of `HybridObject.toString()`
|
|
43
|
+
override fun toString(): String {
|
|
44
|
+
return "[HybridObject NativeBleNitro]"
|
|
45
|
+
}
|
|
46
|
+
|
|
39
47
|
// Properties
|
|
40
48
|
@get:DoNotStrip
|
|
41
49
|
@get:Keep
|
|
@@ -53,11 +61,11 @@ abstract class HybridNativeBleNitroSpec: HybridObject() {
|
|
|
53
61
|
return __result
|
|
54
62
|
}
|
|
55
63
|
|
|
56
|
-
abstract fun startScan(filter: ScanFilter, callback: (device:
|
|
64
|
+
abstract fun startScan(filter: ScanFilter, callback: (device: Variant_NullType_BLEDevice?, error: Variant_NullType_String?) -> Unit): Unit
|
|
57
65
|
|
|
58
66
|
@DoNotStrip
|
|
59
67
|
@Keep
|
|
60
|
-
private fun startScan_cxx(filter: ScanFilter, callback:
|
|
68
|
+
private fun startScan_cxx(filter: ScanFilter, callback: Func_void_std__optional_std__variant_nitro__NullType__BLEDevice___std__optional_std__variant_nitro__NullType__std__string__): Unit {
|
|
61
69
|
val __result = startScan(filter, callback)
|
|
62
70
|
return __result
|
|
63
71
|
}
|
|
@@ -195,6 +203,6 @@ abstract class HybridNativeBleNitroSpec: HybridObject() {
|
|
|
195
203
|
private external fun initHybrid(): HybridData
|
|
196
204
|
|
|
197
205
|
companion object {
|
|
198
|
-
|
|
206
|
+
protected const val TAG = "HybridNativeBleNitroSpec"
|
|
199
207
|
}
|
|
200
208
|
}
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
/// ManufacturerData.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
-
import com.margelo.nitro.core.*
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -17,13 +16,23 @@ import com.margelo.nitro.core.*
|
|
|
17
16
|
*/
|
|
18
17
|
@DoNotStrip
|
|
19
18
|
@Keep
|
|
20
|
-
data class ManufacturerData
|
|
19
|
+
data class ManufacturerData(
|
|
21
20
|
@DoNotStrip
|
|
22
21
|
@Keep
|
|
23
|
-
|
|
22
|
+
val companyIdentifiers: Array<ManufacturerDataEntry>
|
|
23
|
+
) {
|
|
24
|
+
/* primary constructor */
|
|
25
|
+
|
|
26
|
+
companion object {
|
|
27
|
+
/**
|
|
28
|
+
* Constructor called from C++
|
|
29
|
+
*/
|
|
24
30
|
@DoNotStrip
|
|
25
31
|
@Keep
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
@Suppress("unused")
|
|
33
|
+
@JvmStatic
|
|
34
|
+
private fun fromCpp(companyIdentifiers: Array<ManufacturerDataEntry>): ManufacturerData {
|
|
35
|
+
return ManufacturerData(companyIdentifiers)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
29
38
|
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/co/zyke/ble/ManufacturerDataEntry.kt
CHANGED
|
@@ -2,31 +2,40 @@
|
|
|
2
2
|
/// ManufacturerDataEntry.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
-
import com.margelo.nitro.core
|
|
13
|
-
|
|
12
|
+
import com.margelo.nitro.core.ArrayBuffer
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* Represents the JavaScript object/struct "ManufacturerDataEntry".
|
|
17
16
|
*/
|
|
18
17
|
@DoNotStrip
|
|
19
18
|
@Keep
|
|
20
|
-
data class ManufacturerDataEntry
|
|
19
|
+
data class ManufacturerDataEntry(
|
|
21
20
|
@DoNotStrip
|
|
22
21
|
@Keep
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
val id: String,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val data: ArrayBuffer
|
|
26
|
+
) {
|
|
27
|
+
/* primary constructor */
|
|
28
|
+
|
|
29
|
+
companion object {
|
|
30
|
+
/**
|
|
31
|
+
* Constructor called from C++
|
|
32
|
+
*/
|
|
27
33
|
@DoNotStrip
|
|
28
34
|
@Keep
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
@Suppress("unused")
|
|
36
|
+
@JvmStatic
|
|
37
|
+
private fun fromCpp(id: String, data: ArrayBuffer): ManufacturerDataEntry {
|
|
38
|
+
return ManufacturerDataEntry(id, data)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
32
41
|
}
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
/// OperationResult.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
-
import com.margelo.nitro.core.*
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -17,16 +16,26 @@ import com.margelo.nitro.core.*
|
|
|
17
16
|
*/
|
|
18
17
|
@DoNotStrip
|
|
19
18
|
@Keep
|
|
20
|
-
data class OperationResult
|
|
19
|
+
data class OperationResult(
|
|
21
20
|
@DoNotStrip
|
|
22
21
|
@Keep
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
val success: Boolean,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val error: String?
|
|
26
|
+
) {
|
|
27
|
+
/* primary constructor */
|
|
28
|
+
|
|
29
|
+
companion object {
|
|
30
|
+
/**
|
|
31
|
+
* Constructor called from C++
|
|
32
|
+
*/
|
|
27
33
|
@DoNotStrip
|
|
28
34
|
@Keep
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
@Suppress("unused")
|
|
36
|
+
@JvmStatic
|
|
37
|
+
private fun fromCpp(success: Boolean, error: String?): OperationResult {
|
|
38
|
+
return OperationResult(success, error)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
32
41
|
}
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
/// ScanFilter.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.co.zyke.ble
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
-
import com.margelo.nitro.core.*
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -17,22 +16,32 @@ import com.margelo.nitro.core.*
|
|
|
17
16
|
*/
|
|
18
17
|
@DoNotStrip
|
|
19
18
|
@Keep
|
|
20
|
-
data class ScanFilter
|
|
19
|
+
data class ScanFilter(
|
|
21
20
|
@DoNotStrip
|
|
22
21
|
@Keep
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
val serviceUUIDs: Array<String>,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val rssiThreshold: Double,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val allowDuplicates: Boolean,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val androidScanMode: AndroidScanMode
|
|
32
|
+
) {
|
|
33
|
+
/* primary constructor */
|
|
34
|
+
|
|
35
|
+
companion object {
|
|
36
|
+
/**
|
|
37
|
+
* Constructor called from C++
|
|
38
|
+
*/
|
|
33
39
|
@DoNotStrip
|
|
34
40
|
@Keep
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
@Suppress("unused")
|
|
42
|
+
@JvmStatic
|
|
43
|
+
private fun fromCpp(serviceUUIDs: Array<String>, rssiThreshold: Double, allowDuplicates: Boolean, androidScanMode: AndroidScanMode): ScanFilter {
|
|
44
|
+
return ScanFilter(serviceUUIDs, rssiThreshold, allowDuplicates, androidScanMode)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
38
47
|
}
|