/// /// HybridMunimBluetoothSpec.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.munimbluetooth import androidx.annotation.Keep import com.facebook.jni.HybridData import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.Promise import com.margelo.nitro.core.HybridObject /** * A Kotlin class representing the MunimBluetooth HybridObject. * Implement this abstract class to create Kotlin-based instances of MunimBluetooth. */ @DoNotStrip @Keep @Suppress( "KotlinJniMissingFunction", "unused", "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet", "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName" ) abstract class HybridMunimBluetoothSpec: HybridObject() { @DoNotStrip private var mHybridData: HybridData = initHybrid() init { super.updateNative(mHybridData) } override fun updateNative(hybridData: HybridData) { mHybridData = hybridData super.updateNative(hybridData) } // Default implementation of `HybridObject.toString()` override fun toString(): String { return "[HybridObject MunimBluetooth]" } // Properties // Methods @DoNotStrip @Keep abstract fun startAdvertising(options: AdvertisingOptions): Unit @DoNotStrip @Keep abstract fun updateAdvertisingData(advertisingData: AdvertisingDataTypes): Unit @DoNotStrip @Keep abstract fun getAdvertisingData(): Promise @DoNotStrip @Keep abstract fun stopAdvertising(): Unit @DoNotStrip @Keep abstract fun setServices(services: Array): Unit @DoNotStrip @Keep abstract fun isBluetoothEnabled(): Promise @DoNotStrip @Keep abstract fun requestBluetoothPermission(): Promise @DoNotStrip @Keep abstract fun startScan(options: ScanOptions?): Unit @DoNotStrip @Keep abstract fun stopScan(): Unit @DoNotStrip @Keep abstract fun connect(deviceId: String): Promise @DoNotStrip @Keep abstract fun disconnect(deviceId: String): Unit @DoNotStrip @Keep abstract fun discoverServices(deviceId: String): Promise> @DoNotStrip @Keep abstract fun readCharacteristic(deviceId: String, serviceUUID: String, characteristicUUID: String): Promise @DoNotStrip @Keep abstract fun writeCharacteristic(deviceId: String, serviceUUID: String, characteristicUUID: String, value: String, writeType: WriteType?): Promise @DoNotStrip @Keep abstract fun subscribeToCharacteristic(deviceId: String, serviceUUID: String, characteristicUUID: String): Unit @DoNotStrip @Keep abstract fun unsubscribeFromCharacteristic(deviceId: String, serviceUUID: String, characteristicUUID: String): Unit @DoNotStrip @Keep abstract fun getConnectedDevices(): Promise> @DoNotStrip @Keep abstract fun readRSSI(deviceId: String): Promise @DoNotStrip @Keep abstract fun addListener(eventName: String): Unit @DoNotStrip @Keep abstract fun removeListeners(count: Double): Unit private external fun initHybrid(): HybridData companion object { protected const val TAG = "HybridMunimBluetoothSpec" } }