react-native-ble-nitro 1.9.3 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/android/src/main/java/com/margelo/nitro/co/zyke/ble/BleNitroBleManager.kt +4 -0
- package/ios/BleNitroBleManager.swift +38 -3
- package/lib/commonjs/manager.d.ts +8 -0
- package/lib/commonjs/manager.d.ts.map +1 -1
- package/lib/commonjs/manager.js +11 -0
- package/lib/commonjs/manager.js.map +1 -1
- package/lib/commonjs/specs/NativeBleNitro.nitro.d.ts +1 -0
- package/lib/commonjs/specs/NativeBleNitro.nitro.d.ts.map +1 -1
- package/lib/manager.d.ts +8 -0
- package/lib/manager.js +10 -0
- package/lib/specs/NativeBleNitro.nitro.d.ts +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 +31 -9
- package/nitrogen/generated/android/c++/JHybridNativeBleNitroSpec.hpp +5 -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 +17 -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 +19 -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 +12 -5
- package/nitrogen/generated/ios/swift/HybridNativeBleNitroSpec_cxx.swift +59 -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 +2 -1
- package/nitrogen/generated/shared/c++/HybridNativeBleNitroSpec.hpp +5 -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/plugin/build/withBleNitro.d.ts +8 -0
- package/plugin/build/withBleNitro.js +4 -1
- package/src/manager.ts +13 -2
- package/src/specs/NativeBleNitro.nitro.ts +1 -0
- 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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_NullType_BLEDevice.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <variant>
|
|
12
|
+
|
|
13
|
+
#include <NitroModules/Null.hpp>
|
|
14
|
+
#include "BLEDevice.hpp"
|
|
15
|
+
#include <variant>
|
|
16
|
+
#include <NitroModules/JNull.hpp>
|
|
17
|
+
#include "JBLEDevice.hpp"
|
|
18
|
+
#include <string>
|
|
19
|
+
#include "ManufacturerData.hpp"
|
|
20
|
+
#include "JManufacturerData.hpp"
|
|
21
|
+
#include "ManufacturerDataEntry.hpp"
|
|
22
|
+
#include <vector>
|
|
23
|
+
#include "JManufacturerDataEntry.hpp"
|
|
24
|
+
#include <NitroModules/ArrayBuffer.hpp>
|
|
25
|
+
#include <NitroModules/JArrayBuffer.hpp>
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::co::zyke::ble {
|
|
28
|
+
|
|
29
|
+
using namespace facebook;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The C++ JNI bridge between the C++ std::variant and the Java class "Variant_NullType_BLEDevice".
|
|
33
|
+
*/
|
|
34
|
+
class JVariant_NullType_BLEDevice: public jni::JavaClass<JVariant_NullType_BLEDevice> {
|
|
35
|
+
public:
|
|
36
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/co/zyke/ble/Variant_NullType_BLEDevice;";
|
|
37
|
+
|
|
38
|
+
static jni::local_ref<JVariant_NullType_BLEDevice> create_0(jni::alias_ref<JNull> value) {
|
|
39
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_NullType_BLEDevice(jni::alias_ref<JNull>)>("create");
|
|
40
|
+
return method(javaClassStatic(), value);
|
|
41
|
+
}
|
|
42
|
+
static jni::local_ref<JVariant_NullType_BLEDevice> create_1(jni::alias_ref<JBLEDevice> value) {
|
|
43
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_NullType_BLEDevice(jni::alias_ref<JBLEDevice>)>("create");
|
|
44
|
+
return method(javaClassStatic(), value);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static jni::local_ref<JVariant_NullType_BLEDevice> fromCpp(const std::variant<nitro::NullType, BLEDevice>& variant) {
|
|
48
|
+
switch (variant.index()) {
|
|
49
|
+
case 0: return create_0(JNull::null());
|
|
50
|
+
case 1: return create_1(JBLEDevice::fromCpp(std::get<1>(variant)));
|
|
51
|
+
default: throw std::invalid_argument("Variant holds unknown index! (" + std::to_string(variant.index()) + ")");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[[nodiscard]] std::variant<nitro::NullType, BLEDevice> toCpp() const;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
namespace JVariant_NullType_BLEDevice_impl {
|
|
59
|
+
class First final: public jni::JavaClass<First, JVariant_NullType_BLEDevice> {
|
|
60
|
+
public:
|
|
61
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/co/zyke/ble/Variant_NullType_BLEDevice$First;";
|
|
62
|
+
|
|
63
|
+
[[nodiscard]] jni::local_ref<JNull> getValue() const {
|
|
64
|
+
static const auto field = javaClassStatic()->getField<JNull>("value");
|
|
65
|
+
return getFieldValue(field);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
class Second final: public jni::JavaClass<Second, JVariant_NullType_BLEDevice> {
|
|
70
|
+
public:
|
|
71
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/co/zyke/ble/Variant_NullType_BLEDevice$Second;";
|
|
72
|
+
|
|
73
|
+
[[nodiscard]] jni::local_ref<JBLEDevice> getValue() const {
|
|
74
|
+
static const auto field = javaClassStatic()->getField<JBLEDevice>("value");
|
|
75
|
+
return getFieldValue(field);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
} // namespace JVariant_NullType_BLEDevice_impl
|
|
79
|
+
} // namespace margelo::nitro::co::zyke::ble
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_NullType_String.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 "JVariant_NullType_String.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::co::zyke::ble {
|
|
11
|
+
/**
|
|
12
|
+
* Converts JVariant_NullType_String to std::variant<nitro::NullType, std::string>
|
|
13
|
+
*/
|
|
14
|
+
std::variant<nitro::NullType, std::string> JVariant_NullType_String::toCpp() const {
|
|
15
|
+
if (isInstanceOf(JVariant_NullType_String_impl::First::javaClassStatic())) {
|
|
16
|
+
// It's a `nitro::NullType`
|
|
17
|
+
auto jniValue = static_cast<const JVariant_NullType_String_impl::First*>(this)->getValue();
|
|
18
|
+
return nitro::null;
|
|
19
|
+
} else if (isInstanceOf(JVariant_NullType_String_impl::Second::javaClassStatic())) {
|
|
20
|
+
// It's a `std::string`
|
|
21
|
+
auto jniValue = static_cast<const JVariant_NullType_String_impl::Second*>(this)->getValue();
|
|
22
|
+
return jniValue->toStdString();
|
|
23
|
+
}
|
|
24
|
+
throw std::invalid_argument("Variant is unknown Kotlin instance!");
|
|
25
|
+
}
|
|
26
|
+
} // namespace margelo::nitro::co::zyke::ble
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_NullType_String.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <variant>
|
|
12
|
+
|
|
13
|
+
#include <NitroModules/Null.hpp>
|
|
14
|
+
#include <string>
|
|
15
|
+
#include <variant>
|
|
16
|
+
#include <NitroModules/JNull.hpp>
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::co::zyke::ble {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The C++ JNI bridge between the C++ std::variant and the Java class "Variant_NullType_String".
|
|
24
|
+
*/
|
|
25
|
+
class JVariant_NullType_String: public jni::JavaClass<JVariant_NullType_String> {
|
|
26
|
+
public:
|
|
27
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/co/zyke/ble/Variant_NullType_String;";
|
|
28
|
+
|
|
29
|
+
static jni::local_ref<JVariant_NullType_String> create_0(jni::alias_ref<JNull> value) {
|
|
30
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_NullType_String(jni::alias_ref<JNull>)>("create");
|
|
31
|
+
return method(javaClassStatic(), value);
|
|
32
|
+
}
|
|
33
|
+
static jni::local_ref<JVariant_NullType_String> create_1(jni::alias_ref<jni::JString> value) {
|
|
34
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_NullType_String(jni::alias_ref<jni::JString>)>("create");
|
|
35
|
+
return method(javaClassStatic(), value);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static jni::local_ref<JVariant_NullType_String> fromCpp(const std::variant<nitro::NullType, std::string>& variant) {
|
|
39
|
+
switch (variant.index()) {
|
|
40
|
+
case 0: return create_0(JNull::null());
|
|
41
|
+
case 1: return create_1(jni::make_jstring(std::get<1>(variant)));
|
|
42
|
+
default: throw std::invalid_argument("Variant holds unknown index! (" + std::to_string(variant.index()) + ")");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[[nodiscard]] std::variant<nitro::NullType, std::string> toCpp() const;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
namespace JVariant_NullType_String_impl {
|
|
50
|
+
class First final: public jni::JavaClass<First, JVariant_NullType_String> {
|
|
51
|
+
public:
|
|
52
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/co/zyke/ble/Variant_NullType_String$First;";
|
|
53
|
+
|
|
54
|
+
[[nodiscard]] jni::local_ref<JNull> getValue() const {
|
|
55
|
+
static const auto field = javaClassStatic()->getField<JNull>("value");
|
|
56
|
+
return getFieldValue(field);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
class Second final: public jni::JavaClass<Second, JVariant_NullType_String> {
|
|
61
|
+
public:
|
|
62
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/co/zyke/ble/Variant_NullType_String$Second;";
|
|
63
|
+
|
|
64
|
+
[[nodiscard]] jni::local_ref<jni::JString> getValue() const {
|
|
65
|
+
static const auto field = javaClassStatic()->getField<jni::JString>("value");
|
|
66
|
+
return getFieldValue(field);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
} // namespace JVariant_NullType_String_impl
|
|
70
|
+
} // namespace margelo::nitro::co::zyke::ble
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// AndroidScanMode.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
|
|
@@ -20,4 +20,6 @@ enum class AndroidScanMode(@DoNotStrip @Keep val value: Int) {
|
|
|
20
20
|
BALANCED(1),
|
|
21
21
|
LOWPOWER(2),
|
|
22
22
|
OPPORTUNISTIC(3);
|
|
23
|
+
|
|
24
|
+
companion object
|
|
23
25
|
}
|
|
@@ -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,15 @@ abstract class HybridNativeBleNitroSpec: HybridObject() {
|
|
|
53
61
|
return __result
|
|
54
62
|
}
|
|
55
63
|
|
|
56
|
-
|
|
64
|
+
@DoNotStrip
|
|
65
|
+
@Keep
|
|
66
|
+
abstract fun iosLazyInit(): Unit
|
|
67
|
+
|
|
68
|
+
abstract fun startScan(filter: ScanFilter, callback: (device: Variant_NullType_BLEDevice?, error: Variant_NullType_String?) -> Unit): Unit
|
|
57
69
|
|
|
58
70
|
@DoNotStrip
|
|
59
71
|
@Keep
|
|
60
|
-
private fun startScan_cxx(filter: ScanFilter, callback:
|
|
72
|
+
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
73
|
val __result = startScan(filter, callback)
|
|
62
74
|
return __result
|
|
63
75
|
}
|
|
@@ -195,6 +207,6 @@ abstract class HybridNativeBleNitroSpec: HybridObject() {
|
|
|
195
207
|
private external fun initHybrid(): HybridData
|
|
196
208
|
|
|
197
209
|
companion object {
|
|
198
|
-
|
|
210
|
+
protected const val TAG = "HybridNativeBleNitroSpec"
|
|
199
211
|
}
|
|
200
212
|
}
|
|
@@ -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
|
}
|