ServiceRepository

Interface for managing background service state, connection status, and mesh events.

This repository acts as the primary data bridge between the long-running mesh service and the UI/Feature layers. It maintains reactive flows for connection status, error messages, and incoming mesh traffic.

Properties

Link copied to clipboard
abstract val clientNotification: ERROR CLASS: Symbol not found for StateFlow<ERROR CLASS: Symbol not found for ClientNotification?>

Reactive flow of high-level client notifications.

Link copied to clipboard
abstract val connectionProgress: ERROR CLASS: Symbol not found for StateFlow<kotlin/String?>

Reactive flow of connection progress messages.

Link copied to clipboard
abstract val connectionState: ERROR CLASS: Symbol not found for StateFlow<ERROR CLASS: Symbol not found for ConnectionState>

Reactive flow of the current connection state.

Link copied to clipboard
abstract val errorMessage: ERROR CLASS: Symbol not found for StateFlow<kotlin/String?>

Reactive flow of human-readable error messages.

Link copied to clipboard
abstract val meshPacketFlow: ERROR CLASS: Symbol not found for SharedFlow<ERROR CLASS: Symbol not found for MeshPacket>

Flow of all raw MeshPacket objects received from the mesh.

Link copied to clipboard
abstract val neighborInfoResponse: ERROR CLASS: Symbol not found for StateFlow<kotlin/String?>

Reactive flow of the most recent neighbor info response (formatted string).

Link copied to clipboard
abstract val serviceAction: ERROR CLASS: Symbol not found for Flow<ERROR CLASS: Symbol not found for ServiceAction>

Flow of service actions requested by the UI (e.g., "Favorite Node", "Mute Node").

Link copied to clipboard
abstract val tracerouteResponse: ERROR CLASS: Symbol not found for StateFlow<ERROR CLASS: Symbol not found for TracerouteResponse?>

Reactive flow of the most recent traceroute result.

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

Clears the current neighbor info response.

Link copied to clipboard

Clears the current traceroute response.

Link copied to clipboard
abstract suspend fun emitMeshPacket(packet: ERROR CLASS: Symbol not found for MeshPacket)

Emits a mesh packet into the flow.

Link copied to clipboard
abstract suspend fun onServiceAction(action: ERROR CLASS: Symbol not found for ServiceAction)

Dispatches a service action to be handled by the background service.

Link copied to clipboard
abstract fun setClientNotification(notification: ERROR CLASS: Symbol not found for 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: ERROR CLASS: Symbol not found for ConnectionState)

Updates the current connection state.

Link copied to clipboard
abstract fun setErrorMessage(text: String, severity: ERROR CLASS: Symbol not found for 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
abstract fun setTracerouteResponse(value: ERROR CLASS: Symbol not found for TracerouteResponse??)

Sets the traceroute response.