/// /// 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() { // 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 updateCharacteristicValue(serviceUUID: String, characteristicUUID: String, value: String, notify: Boolean?): Promise @DoNotStrip @Keep abstract fun isBluetoothEnabled(): Promise @DoNotStrip @Keep abstract fun requestBluetoothPermission(): Promise @DoNotStrip @Keep abstract fun getCapabilities(): 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 readDescriptor(deviceId: String, serviceUUID: String, characteristicUUID: String, descriptorUUID: String): Promise @DoNotStrip @Keep abstract fun writeCharacteristic(deviceId: String, serviceUUID: String, characteristicUUID: String, value: String, writeType: WriteType?): Promise @DoNotStrip @Keep abstract fun writeDescriptor(deviceId: String, serviceUUID: String, characteristicUUID: String, descriptorUUID: String, value: String): 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 requestMTU(deviceId: String, mtu: Double): Promise @DoNotStrip @Keep abstract fun setPreferredPhy(deviceId: String, txPhy: BluetoothPhy, rxPhy: BluetoothPhy, phyOption: BluetoothPhyOption?): Promise @DoNotStrip @Keep abstract fun readPhy(deviceId: String): Promise @DoNotStrip @Keep abstract fun getBondState(deviceId: String): Promise @DoNotStrip @Keep abstract fun createBond(deviceId: String): Promise @DoNotStrip @Keep abstract fun removeBond(deviceId: String): Promise @DoNotStrip @Keep abstract fun startExtendedAdvertising(options: ExtendedAdvertisingOptions): Promise @DoNotStrip @Keep abstract fun stopExtendedAdvertising(advertisingId: String): Unit @DoNotStrip @Keep abstract fun publishL2CAPChannel(encryptionRequired: Boolean?): Promise @DoNotStrip @Keep abstract fun unpublishL2CAPChannel(psm: Double): Unit @DoNotStrip @Keep abstract fun openL2CAPChannel(deviceId: String, psm: Double): Promise @DoNotStrip @Keep abstract fun closeL2CAPChannel(channelId: String): Unit @DoNotStrip @Keep abstract fun sendL2CAPData(channelId: String, value: String): Promise @DoNotStrip @Keep abstract fun startClassicScan(): Unit @DoNotStrip @Keep abstract fun stopClassicScan(): Unit @DoNotStrip @Keep abstract fun connectClassic(deviceId: String, serviceUUID: String?): Promise @DoNotStrip @Keep abstract fun startClassicServer(serviceUUID: String?, serviceName: String?): Promise @DoNotStrip @Keep abstract fun stopClassicServer(serviceUUID: String?): Unit @DoNotStrip @Keep abstract fun disconnectClassic(deviceId: String): Unit @DoNotStrip @Keep abstract fun writeClassic(deviceId: String, value: String): Promise @DoNotStrip @Keep abstract fun startBackgroundSession(options: BackgroundSessionOptions): Unit @DoNotStrip @Keep abstract fun stopBackgroundSession(): Unit @DoNotStrip @Keep abstract fun startMultipeerSession(options: MultipeerSessionOptions): Unit @DoNotStrip @Keep abstract fun stopMultipeerSession(): Unit @DoNotStrip @Keep abstract fun inviteMultipeerPeer(peerId: String): Unit @DoNotStrip @Keep abstract fun getMultipeerPeers(): Promise> @DoNotStrip @Keep abstract fun sendMultipeerMessage(value: String, peerIds: Array?, reliable: Boolean?): Promise @DoNotStrip @Keep abstract fun addListener(eventName: String): Unit @DoNotStrip @Keep abstract fun removeListeners(count: Double): Unit // Default implementation of `HybridObject.toString()` override fun toString(): String { return "[HybridObject MunimBluetooth]" } // C++ backing class @DoNotStrip @Keep protected open class CxxPart(javaPart: HybridMunimBluetoothSpec): HybridObject.CxxPart(javaPart) { // C++ JHybridMunimBluetoothSpec::CxxPart::initHybrid(...) external override fun initHybrid(): HybridData } override fun createCxxPart(): CxxPart { return CxxPart(this) } companion object { protected const val TAG = "HybridMunimBluetoothSpec" } }