Package-level declarations

Types

Link copied to clipboard
class AndroidMdocTransportFactory(centralConfig: BleCentralConfig = BleCentralConfig()) : MdocTransportFactory

An MdocTransportFactory for Android that uses the platform Android Bluetooth stack (BluetoothGatt, BluetoothLeScanner, BluetoothGattServer, BluetoothLeAdvertiser, and BluetoothSocket L2CAP channels) with configurable BleCentralConfig retry and timeout parameters.

Link copied to clipboard
data class BleCentralConfig(val scanRestartTimeout: Duration? = 10.seconds, val maxScanFailureRetries: Int = 10, val scanFailureRetryDelay: Duration = 500.milliseconds, val postScanDelay: Duration = 150.milliseconds, val maxConnectRetries: Int = 10, val connectRetryDelay: Duration = 500.milliseconds, val maxDiscoverServicesRetries: Int = 10, val discoverServicesRetryDelay: Duration = 500.milliseconds, val requireL2capPeripheralConnectedFirst: Boolean = false, val l2capConnectTimeout: Duration? = 3.seconds, val maxL2capConnectRetries: Int = 10, val l2capRetryInitialDelay: Duration = 500.milliseconds, val l2capRetryMaxDelay: Duration = 4.seconds)

Timing, retry, and connection parameters for BLE Central operations when constructing a BLE MdocTransport via createBleMdocTransport.

Link copied to clipboard
interface BleCentralHal

Low-level BLE Central Hardware Abstraction Layer (HAL) used to back BLE mdoc transports.

Link copied to clipboard
interface BleL2capChannel

Abstraction for an L2CAP channel used by BLE central and peripheral mdoc transports.

Link copied to clipboard

Low-level BLE Peripheral Hardware Abstraction Layer (HAL) used to back BLE mdoc transports.

Link copied to clipboard
abstract class MdocTransport

An abstraction of a ISO/IEC 18013-5:2021 device retrieval method.

Link copied to clipboard

Thrown by MdocTransport.waitForMessage if the transport was closed by another coroutine while waiting.

Link copied to clipboard

Thrown if an unrecoverable error occurs.

Link copied to clipboard

An interface used to create MdocTransport instances.

Link copied to clipboard
data class MdocTransportOptions(val bleUseL2CAP: Boolean = false)

Options for using a MdocTransport.

Link copied to clipboard
data class MdocTransportStats(val transportType: MdocTransportType, val role: MdocRole, val bytesSent: Long = 0, val bytesReceived: Long = 0, val numMessagesSent: Int = 0, val numMessagesReceived: Int = 0, val warnings: List<TransportWarning> = emptyList(), val bleScanningTime: Duration? = null, val bleConnectingTime: Duration? = null, val bleUsingL2cap: Boolean? = null, val bleL2capPsmInEngagement: Boolean? = null, val bleNegotiatedMtu: Int? = null, val bleMtuInferredFromWrite: Boolean? = null, val bleNumScanRestarts: Int? = null, val bleNumGattConnectRetries: Int? = null, val bleNumMtuRequestRetries: Int? = null, val bleNumServiceDiscoveryRetries: Int? = null, val bleNumCharacteristicDiscoveryRetries: Int? = null, val bleNumCharacteristicReadRetries: Int? = null, val bleNumDescriptorWriteRetries: Int? = null, val bleNumL2capConnectRetries: Int? = null, val bleNumChunksSent: Int? = null, val bleNumChunksReceived: Int? = null, val nfcHybridNumSentViaNfc: Int? = null, val nfcHybridNumSentViaTransport: Int? = null, val nfcHybridNumReceivedFirstOnNfc: Int? = null, val nfcHybridNumReceivedFirstOnTransport: Int? = null, val nfcDisconnectedDuringTransaction: Boolean? = null)

Diagnostic and performance statistics for an MdocTransport instance.

Link copied to clipboard

Thrown if transport-specific termination was requested but not supported by the underlying tranposrt.

Link copied to clipboard

Type of transport used for an ISO/IEC 18013-5 or 18013-7 mdoc transaction.

Link copied to clipboard
class NfcCceTransportMdoc(sendMessageViaNfc: suspend (message: ByteString) -> Boolean) : MdocTransport

Transport for ISO/IEC 18013-5 Second Edition NFC Concurrent Channel Engagement (CCE) on the mdoc side.

Link copied to clipboard
class NfcCceTransportMdocReader(nfcTag: NfcIsoTag, negotiatedTransport: MdocTransport?, apduCommandMaxSize: Int = 65535, apduResponseMaxSize: Int = 65536) : MdocTransport

Transport for ISO/IEC 18013-5 Second Edition NFC Concurrent Channel Engagement (CCE) on the reader side.

Link copied to clipboard
class NfcTransportMdoc(val role: MdocRole, options: MdocTransportOptions, val connectionMethod: MdocConnectionMethod) : MdocTransport
Link copied to clipboard
Link copied to clipboard

A structured warning recorded during a transport or presentment session.

Link copied to clipboard

Structured warning code recorded during transport or presentment execution.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

A helper for advertising a number of connections to a remote peer.

Link copied to clipboard
fun createBleMdocTransport(connectionMethod: MdocConnectionMethod.Ble, role: MdocRole, options: MdocTransportOptions = MdocTransportOptions(), centralConfig: BleCentralConfig = BleCentralConfig(), centralHalFactory: () -> BleCentralHal, peripheralHalFactory: () -> BlePeripheralHal): MdocTransport

Creates a BLE MdocTransport for a single-mode connectionMethod and role backed by the given centralHalFactory and peripheralHalFactory.

Link copied to clipboard
fun createMdocTransports(connectionMethods: List<MdocConnectionMethod>, role: MdocRole, options: MdocTransportOptions = MdocTransportOptions(), centralConfig: BleCentralConfig = BleCentralConfig(), centralHalFactory: () -> BleCentralHal, peripheralHalFactory: () -> BlePeripheralHal, nonBleTransportFactory: (MdocConnectionMethod) -> MdocTransport): List<MdocTransport>

Creates the MdocTransport instances needed to serve connectionMethods for role, coalescing co-hosted BLE Peripheral modes (direct-L2CAP + GATT sharing the same non-null service UUID) onto a single dual-mode BLE Peripheral MdocTransport and delegating non-BLE methods to nonBleTransportFactory.

Link copied to clipboard
suspend fun List<MdocTransport>.waitForConnection(eSenderKeyBytes: ByteString): MdocTransport

A helper for waiting until someone connects to a transport.