Package-level declarations

Types

Link copied to clipboard
abstract class BaseScanner(settings: BaseScanner.Settings, coroutineScope: CoroutineScope, scanningDispatcher: CoroutineDispatcher = com.splendo.kaluga.bluetooth.scanner.scanningDispatcher) : Scanner, CoroutineScope

An abstract implementation for Scanner

Link copied to clipboard
abstract class BaseScanningStateRepo(createNotInitializedState: () -> ScanningState.NotInitialized, createInitializingState: suspend ColdStateFlowRepo<ScanningState>.(ScanningState.Inactive) -> suspend () -> ScanningState, createDeinitializingState: suspend ColdStateFlowRepo<ScanningState>.(ScanningState.Active) -> suspend () -> ScanningState.Deinitialized, coroutineContext: CoroutineContext) : ColdStateFlowRepo<ScanningState>

An abstract ColdStateFlowRepo for managing ScanningState

Link copied to clipboard
data class DefaultDevices(val allDevices: Map<Identifier, Device>, val identifiersFoundForDeviceDiscoveryMode: Map<ScanningState.DeviceDiscoveryMode, Set<Identifier>>, val currentScanFilter: ScanningState.DeviceDiscoveryMode.Scanning) : ScanningState.Devices

Default implementation of ScanningState.Devices

Link copied to clipboard

A default implementation of BaseScanner

A default implementation of BaseScanner

actual class DefaultScanner

A default implementation of BaseScanner

Default implementation of BaseScanner

Default implementation of BaseScanner

Link copied to clipboard
typealias EnableSensorAction = suspend () -> Boolean
Link copied to clipboard
typealias Filter = Set<UUID>

A set of UUID to apply to a scan result If not empty, only Device that are advertising at least one Service matching one of the UUID will be scanned.

Link copied to clipboard
Link copied to clipboard

The KalugaState of scanning for Bluetooth devices

Link copied to clipboard

A StateRepo/MutableStateFlow of ScanningState

Link copied to clipboard
open class ScanningStateImplRepo(createScanner: suspend () -> Scanner, contextForIdentifier: (Identifier) -> CoroutineContext, coroutineContext: CoroutineContext) : BaseScanningStateRepo

A BaseScanningStateRepo managed using a Scanner

Link copied to clipboard
class ScanningStateRepo(settingsBuilder: suspend (CoroutineContext) -> BaseScanner.Settings, builder: BaseScanner.Builder, contextForIdentifier: (Identifier) -> CoroutineContext, coroutineContext: CoroutineContext) : ScanningStateImplRepo

Functions

Link copied to clipboard
suspend fun ScanningState.Enabled.Scanning.discoverDevice(identifier: Identifier, rssi: RSSI, advertisementData: BaseAdvertisementData, deviceCreator: () -> Device): suspend () -> ScanningState.Enabled.Scanning

Transitions into a Scanning state where a Device is added or updated