BluetoothServerBuilder

A default implementation of com.splendo.kaluga.bluetooth.server.BaseBluetoothServerBuilder

Parameters

permissionsBuilder

a method for creating the com.splendo.kaluga.permissions.base.Permissions object to manage the Bluetooth permissions.

A default implementation of com.splendo.kaluga.bluetooth.server.BaseBluetoothServerBuilder

Parameters

permissionsBuilder

a method for creating the Permissions object to manage the Bluetooth permissions. Needs to have com.splendo.kaluga.permissions.bluetooth.BaseBluetoothPermissionManagerBuilder registered.

bundle

the NSBundle in which Bluetooth should run

Constructors

Link copied to clipboard
constructor(applicationContext: Context = ApplicationHolder.applicationContext, permissionsBuilder: suspend (CoroutineContext) -> Permissions = { context -> Permissions( PermissionsBuilder(PermissionContext(applicationContext)).apply { registerBluetoothPermissionIfNotRegistered() registerLocationPermissionIfNotRegistered() }, coroutineContext = context, ) })
constructor(bundle: NSBundle = NSBundle.Companion.mainBundle, permissionsBuilder: suspend (CoroutineContext) -> Permissions = { context -> Permissions( PermissionsBuilder(bundle).apply { registerBluetoothPermissionIfNotRegistered() }, context, ) })

Functions

Link copied to clipboard
actual open suspend override fun createServer(settingsBuilder: (Permissions) -> ServerSettings = { ServerSettings(permissions = it) }, coroutineContext: CoroutineContext = defaultBluetoothServerDispatcher, specs: BluetoothServerDSL.() -> Unit): BluetoothServer

Creates a BluetoothServer

actual open suspend override fun createServer(settingsBuilder: (Permissions) -> ServerSettings = { ServerSettings(permissions = it) }, coroutineContext: CoroutineContext = defaultBluetoothServerDispatcher, specs: BluetoothServerDSL.() -> Unit): BluetoothServer

Creates a BluetoothServer

expect open suspend override fun createServer(settingsBuilder: (Permissions) -> ServerSettings = { ServerSettings(permissions = it) }, coroutineContext: CoroutineContext = defaultBluetoothServerDispatcher, specs: BluetoothServerDSL.() -> Unit): BluetoothServer

Creates a BluetoothServer