ServiceStateWriter

Write-side interface for service state mutations.

Only background handlers, managers, and the service layer should inject this interface. UI/ViewModel code should never write service state directly — it observes via ConnectionStateProvider, TracerouteResponseProvider, or NeighborInfoResponseProvider.

Inheritors

Functions

Link copied to clipboard

Clears the current client notification.

Link copied to clipboard
abstract fun clearErrorMessage()

Clears the current error message.

Link copied to clipboard
abstract suspend fun emitMeshPacket(packet: MeshPacket)

Emits a mesh packet into the shared flow.

Link copied to clipboard
abstract fun setClientNotification(notification: ClientNotification?)

Sets the current client notification.

Link copied to clipboard
abstract fun setConnectionProgress(text: String)

Sets the connection progress message.

Link copied to clipboard
abstract fun setConnectionState(connectionState: ConnectionState)

Updates the canonical app-level connection state. Only MeshConnectionManager should call this.

Link copied to clipboard
abstract fun setErrorMessage(text: String, severity: Severity = Severity.Error)

Sets an error message to be displayed.

Link copied to clipboard
abstract fun setNeighborInfoResponse(value: String?)

Sets the neighbor info response.

Link copied to clipboard

Sets the traceroute response.