/// /// HybridNativeBleNitroSpec.kt /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE. /// https://github.com/mrousavy/nitro /// Copyright © 2025 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.* /** * 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() { @DoNotStrip private var mHybridData: HybridData = initHybrid() init { super.updateNative(mHybridData) } override fun updateNative(hybridData: HybridData) { mHybridData = hybridData super.updateNative(hybridData) } // 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 } abstract fun startScan(filter: ScanFilter, callback: (device: BLEDevice?, error: String?) -> Unit): Unit @DoNotStrip @Keep private fun startScan_cxx(filter: ScanFilter, callback: Func_void_std__optional_BLEDevice__std__optional_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 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 } @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 } 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 private external fun initHybrid(): HybridData companion object { private const val TAG = "HybridNativeBleNitroSpec" } }