All Downloads are FREE. Search and download functionalities are using the official Maven repository.

appleMain.dev.bluefalcon.BluetoothService.kt Maven / Gradle / Ivy

There is a newer version: 2.2.1
Show newest version
package dev.bluefalcon

import kotlinx.coroutines.flow.MutableStateFlow
import platform.CoreBluetooth.CBCharacteristic
import platform.CoreBluetooth.CBService

actual class BluetoothService(val service: CBService) {
    actual val name: String?
        get() = service.UUID.UUIDString
    actual val characteristics: List
        get() = service.characteristics?.map {
             BluetoothCharacteristic(it as CBCharacteristic)
        } ?: emptyList()

    internal actual val _characteristicsFlow = MutableStateFlow>(emptyList())
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy