MqttManager

interface MqttManager(source)

Interface for managing MQTT proxy communication.

Properties

Link copied to clipboard
abstract val mqttConnectionState: StateFlow<MqttConnectionState>

Observable MQTT proxy connection state for UI consumption.

Functions

Link copied to clipboard
abstract fun handleMqttProxyMessage(message: MqttClientProxyMessage)

Handles an MQTT proxy message from the radio.

Link copied to clipboard
abstract suspend fun probe(address: String, tlsEnabled: Boolean, username: String?, password: String?): MqttProbeStatus

Probe an MQTT broker to verify connectivity and credentials without joining the proxy lifecycle. Intended for UI "Test Connection" affordances.

Link copied to clipboard
abstract fun startProxy(enabled: Boolean, proxyToClientEnabled: Boolean)

Starts the MQTT proxy with the given settings.

Link copied to clipboard
abstract fun stop()

Stops the MQTT manager.