/// /// HybridNativeBleNitroSpec.kt /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE. /// https://github.com/mrousavy/nitro /// Copyright © Marc Rousavy @ Margelo /// package com.margelo.nitro.co.zyke.ble import androidx.annotation.Keep import com.facebook.jni.HybridData import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.NullType import com.margelo.nitro.core.ArrayBuffer import com.margelo.nitro.core.Promise import com.margelo.nitro.core.HybridObject /** * A Kotlin class representing the NativeBleNitro HybridObject. * Implement this abstract class to create Kotlin-based instances of NativeBleNitro. */ @DoNotStrip @Keep @Suppress( "KotlinJniMissingFunction", "unused", "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet", "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName" ) abstract class HybridNativeBleNitroSpec: HybridObject() { // Properties @get:DoNotStrip @get:Keep @set:DoNotStrip @set:Keep abstract var restoreStateIdentifier: String? // Methods abstract fun setRestoreStateCallback(callback: (restoredPeripherals: Array) -> Unit): Unit @DoNotStrip @Keep private fun setRestoreStateCallback_cxx(callback: Func_void_std__vector_BLEDevice_): Unit { val __result = setRestoreStateCallback(callback) return __result } @DoNotStrip @Keep abstract fun iosLazyInit(): Unit abstract fun startScan(filter: ScanFilter, callback: (device: Variant_NullType_BLEDevice?, error: Variant_NullType_String?) -> Unit): Unit @DoNotStrip @Keep 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 { val __result = startScan(filter, callback) return __result } @DoNotStrip @Keep abstract fun stopScan(): Boolean @DoNotStrip @Keep abstract fun isScanning(): Boolean @DoNotStrip @Keep abstract fun getConnectedDevices(services: Array): Array abstract fun connect(deviceId: String, callback: (success: Boolean, deviceId: String, error: String) -> Unit, disconnectCallback: ((deviceId: String, interrupted: Boolean, error: String) -> Unit)?, autoConnectAndroid: Boolean?): Unit @DoNotStrip @Keep private fun connect_cxx(deviceId: String, callback: Func_void_bool_std__string_std__string, disconnectCallback: Func_void_std__string_bool_std__string?, autoConnectAndroid: Boolean?): Unit { val __result = connect(deviceId, callback, disconnectCallback?.let { it }, autoConnectAndroid) return __result } abstract fun disconnect(deviceId: String, callback: (success: Boolean, error: String) -> Unit): Unit @DoNotStrip @Keep private fun disconnect_cxx(deviceId: String, callback: Func_void_bool_std__string): Unit { val __result = disconnect(deviceId, callback) return __result } @DoNotStrip @Keep abstract fun isConnected(deviceId: String): Boolean @DoNotStrip @Keep abstract fun requestMTU(deviceId: String, mtu: Double): Double @DoNotStrip @Keep abstract fun requestConnectionPriority(deviceId: String, androidConnectionPriority: AndroidConnectionPriority): Boolean abstract fun readRSSI(deviceId: String, callback: (success: Boolean, rssi: Double, error: String) -> Unit): Unit @DoNotStrip @Keep private fun readRSSI_cxx(deviceId: String, callback: Func_void_bool_double_std__string): Unit { val __result = readRSSI(deviceId, callback) return __result } abstract fun discoverServices(deviceId: String, callback: (success: Boolean, error: String) -> Unit): Unit @DoNotStrip @Keep private fun discoverServices_cxx(deviceId: String, callback: Func_void_bool_std__string): Unit { val __result = discoverServices(deviceId, callback) return __result } abstract fun discoverServicesWithCharacteristics(deviceId: String, callback: (success: Boolean, error: String) -> Unit): Unit @DoNotStrip @Keep private fun discoverServicesWithCharacteristics_cxx(deviceId: String, callback: Func_void_bool_std__string): Unit { val __result = discoverServicesWithCharacteristics(deviceId, callback) return __result } @DoNotStrip @Keep abstract fun getServices(deviceId: String): Array @DoNotStrip @Keep abstract fun getCharacteristics(deviceId: String, serviceId: String): Array abstract fun readCharacteristic(deviceId: String, serviceId: String, characteristicId: String, callback: (success: Boolean, data: ArrayBuffer, error: String) -> Unit): Unit @DoNotStrip @Keep private fun readCharacteristic_cxx(deviceId: String, serviceId: String, characteristicId: String, callback: Func_void_bool_std__shared_ptr_ArrayBuffer__std__string): Unit { val __result = readCharacteristic(deviceId, serviceId, characteristicId, callback) return __result } abstract fun writeCharacteristic(deviceId: String, serviceId: String, characteristicId: String, data: ArrayBuffer, withResponse: Boolean, callback: (success: Boolean, responseData: ArrayBuffer, error: String) -> Unit): Unit @DoNotStrip @Keep private fun writeCharacteristic_cxx(deviceId: String, serviceId: String, characteristicId: String, data: ArrayBuffer, withResponse: Boolean, callback: Func_void_bool_std__shared_ptr_ArrayBuffer__std__string): Unit { val __result = writeCharacteristic(deviceId, serviceId, characteristicId, data, withResponse, callback) return __result } abstract fun subscribeToCharacteristic(deviceId: String, serviceId: String, characteristicId: String, updateCallback: (characteristicId: String, data: ArrayBuffer) -> Unit, completionCallback: (success: Boolean, error: String) -> Unit): Unit @DoNotStrip @Keep private fun subscribeToCharacteristic_cxx(deviceId: String, serviceId: String, characteristicId: String, updateCallback: Func_void_std__string_std__shared_ptr_ArrayBuffer_, completionCallback: Func_void_bool_std__string): Unit { val __result = subscribeToCharacteristic(deviceId, serviceId, characteristicId, updateCallback, completionCallback) return __result } abstract fun unsubscribeFromCharacteristic(deviceId: String, serviceId: String, characteristicId: String, callback: (success: Boolean, error: String) -> Unit): Unit @DoNotStrip @Keep private fun unsubscribeFromCharacteristic_cxx(deviceId: String, serviceId: String, characteristicId: String, callback: Func_void_bool_std__string): Unit { val __result = unsubscribeFromCharacteristic(deviceId, serviceId, characteristicId, callback) return __result } @DoNotStrip @Keep abstract fun isSubscribedToCharacteristic(deviceId: String, serviceId: String, characteristicId: String): Boolean abstract fun requestBluetoothEnable(callback: (success: Boolean, error: String) -> Unit): Unit @DoNotStrip @Keep private fun requestBluetoothEnable_cxx(callback: Func_void_bool_std__string): Unit { val __result = requestBluetoothEnable(callback) return __result } @DoNotStrip @Keep abstract fun state(): BLEState abstract fun subscribeToStateChange(stateCallback: (state: BLEState) -> Unit): OperationResult @DoNotStrip @Keep private fun subscribeToStateChange_cxx(stateCallback: Func_void_BLEState): OperationResult { val __result = subscribeToStateChange(stateCallback) return __result } @DoNotStrip @Keep abstract fun unsubscribeFromStateChange(): OperationResult @DoNotStrip @Keep abstract fun openSettings(): Promise // Default implementation of `HybridObject.toString()` override fun toString(): String { return "[HybridObject NativeBleNitro]" } // C++ backing class @DoNotStrip @Keep protected open class CxxPart(javaPart: HybridNativeBleNitroSpec): HybridObject.CxxPart(javaPart) { // C++ JHybridNativeBleNitroSpec::CxxPart::initHybrid(...) external override fun initHybrid(): HybridData } override fun createCxxPart(): CxxPart { return CxxPart(this) } companion object { protected const val TAG = "HybridNativeBleNitroSpec" } }