feat(wire): migrate from protobuf -> wire (#4401)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2026-02-03 18:01:12 -06:00 committed by GitHub
parent 9dbc8b7fbf
commit 25657e8f8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
239 changed files with 7149 additions and 6144 deletions

View file

@ -18,8 +18,8 @@ package org.meshtastic.core.service
import android.app.Notification
import org.meshtastic.core.database.entity.NodeEntity
import org.meshtastic.proto.MeshProtos
import org.meshtastic.proto.TelemetryProtos
import org.meshtastic.proto.ClientNotification
import org.meshtastic.proto.Telemetry
const val SERVICE_NOTIFY_ID = 101
@ -29,7 +29,7 @@ interface MeshServiceNotifications {
fun initChannels()
fun updateServiceStateNotification(summaryString: String?, telemetry: TelemetryProtos.Telemetry?): Notification
fun updateServiceStateNotification(summaryString: String?, telemetry: Telemetry?): Notification
suspend fun updateMessageNotification(
contactKey: String,
@ -63,11 +63,11 @@ interface MeshServiceNotifications {
fun showOrUpdateLowBatteryNotification(node: NodeEntity, isRemote: Boolean)
fun showClientNotification(clientNotification: MeshProtos.ClientNotification)
fun showClientNotification(clientNotification: ClientNotification)
fun cancelMessageNotification(contactKey: String)
fun cancelLowBatteryNotification(node: NodeEntity)
fun clearClientNotification(notification: MeshProtos.ClientNotification)
fun clearClientNotification(notification: ClientNotification)
}

View file

@ -17,7 +17,7 @@
package org.meshtastic.core.service
import org.meshtastic.core.database.model.Node
import org.meshtastic.proto.AdminProtos
import org.meshtastic.proto.SharedContact
sealed class ServiceAction {
data class GetDeviceMetadata(val destNum: Int) : ServiceAction()
@ -30,7 +30,7 @@ sealed class ServiceAction {
data class Reaction(val emoji: String, val replyId: Int, val contactKey: String) : ServiceAction()
data class ImportContact(val contact: AdminProtos.SharedContact) : ServiceAction()
data class ImportContact(val contact: SharedContact) : ServiceAction()
data class SendContact(val contact: AdminProtos.SharedContact) : ServiceAction()
data class SendContact(val contact: SharedContact) : ServiceAction()
}

View file

@ -25,8 +25,8 @@ import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.receiveAsFlow
import kotlinx.coroutines.withTimeoutOrNull
import org.meshtastic.proto.MeshProtos
import org.meshtastic.proto.MeshProtos.MeshPacket
import org.meshtastic.proto.ClientNotification
import org.meshtastic.proto.MeshPacket
import java.util.concurrent.ConcurrentHashMap
import javax.inject.Inject
import javax.inject.Singleton
@ -83,11 +83,11 @@ class ServiceRepository @Inject constructor() {
_connectionState.value = connectionState
}
private val _clientNotification = MutableStateFlow<MeshProtos.ClientNotification?>(null)
val clientNotification: StateFlow<MeshProtos.ClientNotification?>
private val _clientNotification = MutableStateFlow<ClientNotification?>(null)
val clientNotification: StateFlow<ClientNotification?>
get() = _clientNotification
fun setClientNotification(notification: MeshProtos.ClientNotification?) {
fun setClientNotification(notification: ClientNotification?) {
Logger.e { notification?.message.orEmpty() }
_clientNotification.value = notification