Package-level declarations

Types

Link copied to clipboard
class AndroidMockCharacteristicWrapper(val uuid: UUID = UUID.randomUUID(), descriptorUUIDs: List<UUID> = emptyList(), val service: RemoteServiceWrapper, val properties: Set<CharacteristicProperty> = emptySet()) : MockCharacteristicWrapper
Link copied to clipboard
class AndroidMockDescriptorWrapper(val uuid: UUID = UUID.randomUUID(), val characteristic: RemoteCharacteristicWrapper) : MockDescriptorWrapper
Link copied to clipboard
class AppleMockCharacteristicWrapper(val uuid: CBUUID = CBUUID(), val properties: Set<CharacteristicProperty> = emptySet(), val service: RemoteServiceWrapper = MockServiceWrapper(), descriptorUUIDs: List<CBUUID> = emptyList()) : MockCharacteristicWrapper
Link copied to clipboard
class AppleMockDescriptorWrapper(val uuid: CBUUID = CBUUID(), val characteristic: RemoteCharacteristicWrapper = AppleMockCharacteristicWrapper()) : MockDescriptorWrapper
Link copied to clipboard
Link copied to clipboard
class IOSMockCharacteristicWrapper(val uuid: CBUUID = CBUUID(), val properties: Set<CharacteristicProperty> = emptySet(), val service: RemoteServiceWrapper = MockServiceWrapper(), descriptorUUIDs: List<CBUUID> = emptyList()) : MockCharacteristicWrapper
Link copied to clipboard
class IOSMockDescriptorWrapper(val uuid: CBUUID = CBUUID(), val characteristic: RemoteCharacteristicWrapper = IOSMockCharacteristicWrapper()) : MockDescriptorWrapper
Link copied to clipboard

A mock implementation of BaseBluetoothClientBuilder that creates MockBluetoothServices.

Link copied to clipboard
Link copied to clipboard
class MockBluetoothService(val discoveredDevicesFlow: MutableStateFlow<List<ConnectableDevice>> = MutableStateFlow(emptyList()), val filteredDevicesFlow: MutableStateFlow<Map<Filter, List<ConnectableDevice>>> = MutableStateFlow(emptyMap()), val pairedDevicesFlow: MutableStateFlow<Map<Set<UUID>, List<ConnectableDevice>>> = MutableStateFlow(emptyMap()), val isEnabled: MutableStateFlow<Boolean> = MutableStateFlow(true), setupMocks: Boolean = true) : BluetoothClient
Link copied to clipboard
Link copied to clipboard
data class MockCBPeripheralWrapper(val name: String? = null, val identifier: NSUUID = NSUUID()) : DeviceWrapper
data class MockCBPeripheralWrapper(val name: String? = null, val identifier: NSUUID = NSUUID()) : DeviceWrapper
Link copied to clipboard
Link copied to clipboard

Mock implementation of RemoteDescriptor

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class MockDeviceWrapper(val name: String?, val identifier: Identifier, val bondState: DeviceWrapper.BondState, setupMocks: Boolean = true) : DeviceWrapper
Link copied to clipboard
class MockRemoteServiceWrapper(val uuid: UUID = UUID.randomUUID(), initialCharacteristics: List<ServiceWrapperBuilder.Characteristic> = emptyList()) : RemoteServiceWrapper
Link copied to clipboard
class MockServiceWrapper(val uuid: UUID = UUID(), val type: Service.Type = Service.Type.PRIMARY, val characteristics: List<RemoteCharacteristicWrapper> = emptyList(), val includedServices: List<RemoteServiceWrapper> = emptyList()) : RemoteServiceWrapper
class MockServiceWrapper(val uuid: UUID = UUID(), val type: Service.Type = Service.Type.PRIMARY, val characteristics: List<RemoteCharacteristicWrapper> = emptyList(), val includedServices: List<RemoteServiceWrapper> = emptyList()) : RemoteServiceWrapper
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class WebMockCharacteristicWrapper(val uuid: UUID = randomUUID(), val properties: Set<CharacteristicProperty> = emptySet(), val service: RemoteServiceWrapper = WebMockServiceWrapper(), descriptorUUIDs: List<UUID> = emptyList()) : MockCharacteristicWrapper
Link copied to clipboard
class WebMockDescriptorWrapper(val uuid: UUID = randomUUID(), val characteristic: RemoteCharacteristicWrapper = WebMockCharacteristicWrapper()) : MockDescriptorWrapper
Link copied to clipboard
class WebMockServiceWrapper(val uuid: UUID = randomUUID(), initialCharacteristics: List<ServiceWrapperBuilder.Characteristic> = emptyList()) : RemoteServiceWrapper

Functions

Link copied to clipboard

Build MockDevice, see MockDeviceBuilder

Link copied to clipboard
actual fun createDeviceWrapper(deviceName: String?, identifier: Identifier): DeviceWrapper
actual fun createDeviceWrapper(deviceName: String?, identifier: Identifier): DeviceWrapper
expect fun createDeviceWrapper(deviceName: String? = null, identifier: Identifier = randomIdentifier()): DeviceWrapper
actual fun createDeviceWrapper(deviceName: String?, identifier: Identifier): DeviceWrapper
actual fun createDeviceWrapper(deviceName: String?, identifier: Identifier): DeviceWrapper
Link copied to clipboard
fun createMockDevice(wrapper: DeviceWrapper, coroutineScope: CoroutineScope, connectionSettings: ConnectionSettings = ConnectionSettings( reconnectionSettings = ConnectionSettings.ReconnectionSettings.Never, ), connectionManagerBuilder: MockDeviceConnectionManager.Builder = MockDeviceConnectionManager.Builder(), createDeviceStateFlow: (DeviceConnectionManager, CoroutineContext) -> ConnectableDeviceStateFlowRepo = { manager, coroutineContext -> ConnectableDeviceStateImplRepo(connectionSettings.reconnectionSettings, manager, coroutineContext) }, builder: MockDeviceInfoBuilder.() -> Unit): ConnectableDeviceImpl
fun createMockDevice(identifier: Identifier, connectionSettings: ConnectionSettings = ConnectionSettings( reconnectionSettings = ConnectionSettings.ReconnectionSettings.Never, ), connectionManagerBuilder: (ConnectionSettings) -> DeviceConnectionManager, builder: MockDeviceInfoBuilder.() -> Unit, createDeviceStateFlow: (DeviceConnectionManager, CoroutineContext) -> ConnectableDeviceStateFlowRepo = { manager, coroutineContext -> ConnectableDeviceStateImplRepo(connectionSettings.reconnectionSettings, manager, coroutineContext) }, coroutineScope: CoroutineScope): ConnectableDeviceImpl
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard