BluetoothPermissionStateRepo

class BluetoothPermissionStateRepo(builder: BaseBluetoothPermissionManagerBuilder, monitoringInterval: Duration = defaultMonitoringInterval, settings: BasePermissionManager.Settings = BasePermissionManager.Settings(), coroutineContext: CoroutineContext) : PermissionStateRepo<BluetoothPermission>

A PermissionStateRepo for BluetoothPermission

Parameters

builder

The BluetoothPermissionManagerBuilder for creating the BluetoothPermissionManager associated with the permission

monitoringInterval

the Duration after which the system should poll for changes to the permission if automatic detection is impossible.

settings

the BasePermissionManager.Settings used by the BluetoothPermissionManager created by the builder

coroutineContext

The CoroutineContext to run the state machine on.

Constructors

Link copied to clipboard
constructor(builder: BaseBluetoothPermissionManagerBuilder, monitoringInterval: Duration = defaultMonitoringInterval, settings: BasePermissionManager.Settings = BasePermissionManager.Settings(), coroutineContext: CoroutineContext)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val lazyMutableFlow: Lazy<MutableStateFlow<PermissionState<BluetoothPermission>>>
Link copied to clipboard
open override val stateFlow: StateFlow<PermissionState<BluetoothPermission>>
Link copied to clipboard
val subscriptionCount: StateFlow<Int>

Functions

Link copied to clipboard
open suspend override fun collect(collector: FlowCollector<PermissionState<BluetoothPermission>>): Nothing
Link copied to clipboard
open suspend override fun firstCollection()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <K : PermissionState<BluetoothPermission>> launchTakeAndChangeState(context: CoroutineContext, remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> PermissionState<BluetoothPermission>): Job
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun <Result> useState(action: suspend (PermissionState<BluetoothPermission>) -> Result): Result