MessageStreamManager

Properties

Link copied to clipboard
abstract val oobStateFlow: MutableSharedFlow<OOBWrapper?>
Link copied to clipboard
Link copied to clipboard
abstract val proxyUpdateFlow: SharedFlow<UInt>

Emits deviceId when the stream has an update for that device (new payloads or device added to stream). Proxy should queue DEVICE_INFORMATION.

Functions

Link copied to clipboard
abstract fun addDeviceToStream(deviceId: UInt)
Link copied to clipboard
abstract suspend fun getActiveDevices(): List<UInt>
Link copied to clipboard
abstract suspend fun isStreamActive(): Boolean
Link copied to clipboard
abstract fun processStreamResponse(response: Any)
Link copied to clipboard
abstract suspend fun pushEncryptedHeartbeatAndCiphertext(deviceId: UInt, heartbeats: List<ByteArray>, ciphertexts: List<ByteArray>, heartbeatBridgeReceiveEpochSeconds: List<Long?> = emptyList())
Link copied to clipboard
abstract suspend fun pushEncryptedMessages(deviceId: UInt, payloads: List<ByteArray>, isHeartbeat: Boolean, heartbeatBridgeReceiveEpochSeconds: List<Long?> = emptyList())
Link copied to clipboard
abstract suspend fun removeDeviceFromStream(deviceId: UInt)
Link copied to clipboard
Link copied to clipboard
abstract suspend fun sendTelemetry(data: ByteArray)
Link copied to clipboard
open fun setStreamEstablishedListener(listener: () -> Unit?)

Invoked on the plane stream UI thread / stream coroutine when the stream becomes connected; used to flush persisted device payloads.

Link copied to clipboard
abstract suspend fun shutdown()
Link copied to clipboard