Package-level declarations

Types

Link copied to clipboard
enum class AdminRoute : Enum<AdminRoute>
Link copied to clipboard
class CleanNodeDatabaseViewModel(cleanNodeDatabaseUseCase: CleanNodeDatabaseUseCase, alertManager: AlertManager) : ViewModel

ViewModel for CleanNodeDatabaseScreen. Manages the state and logic for cleaning the node database based on specified criteria. The "older than X days" filter is always active.

Link copied to clipboard
class DatabaseBackupActions(val available: Boolean, val onBackup: () -> Unit, val onRestore: () -> Unit)

Picker-backed entry points for the Backup & Restore section's app database items. available is false until some device has a database.

Link copied to clipboard
class DatabaseBackupViewModel(backupService: DatabaseBackupOperations, fileService: FileService, nodeRepository: NodeRepository, radioController: RadioController, radioPrefs: RadioPrefs, alertManager: AlertManager) : ViewModel

Backs up the app database for the connected device, and stages a restore that applies on the next launch.

Link copied to clipboard
data class RadioConfigState(val isLocal: Boolean = false, val pioEnv: String? = null, val connected: Boolean = false, val route: String = "", val metadata: DeviceMetadata? = null, val userConfig: User = User.Builder().build(), val channelList: List<ChannelSettings> = emptyList(), val radioConfig: LocalConfig = LocalConfig.Builder().build(), val moduleConfig: LocalModuleConfig = LocalModuleConfig.Builder().build(), val ringtone: String = "", val cannedMessageMessages: String = "", val deviceConnectionStatus: DeviceConnectionStatus? = null, val deviceUIConfig: DeviceUIConfig? = null, val fileManifest: List<FileInfo> = emptyList(), val loraRegionPresetMap: LoRaRegionPresetMap? = null, val localIsLicensed: Boolean = false, val responseState: ResponseState<Boolean> = ResponseState.Empty, val analyticsAvailable: Boolean = true, val analyticsEnabled: Boolean = true, val nodeDbResetPreserveFavorites: Boolean = false, val canRebootToDfu: Boolean = false, val isOemFixedGps: Boolean = false)

Data class that represents the current RadioConfig state.

Link copied to clipboard
open class RadioConfigViewModel(initialDestNum: Int?, radioConfigRepository: RadioConfigRepository, serviceRepository: ServiceRepository, nodeRepository: NodeRepository, deviceHardwareRepository: DeviceHardwareRepository, locationRepository: LocationRepository, mapConsentPrefs: MapConsentPrefs, analyticsPrefs: AnalyticsPrefs, homoglyphEncodingPrefs: HomoglyphPrefs, importProfileUseCase: ImportProfileUseCase, exportProfileUseCase: ExportProfileUseCase, importSecurityConfigUseCase: ImportSecurityConfigUseCase, installProfileUseCase: InstallProfileUseCase, radioConfigUseCase: RadioConfigUseCase, adminActionsUseCase: AdminActionsUseCase, processRadioResponseUseCase: ProcessRadioResponseUseCase, locationService: LocationService, fileService: FileService, mqttManager: MqttManager, lockdownCoordinator: LockdownCoordinator, securityKeyBackupStore: SecurityKeyBackupStore, snackbarManager: SnackbarManager, nodeRestartTracker: NodeRestartTracker, connectionManager: MeshConnectionManager, analytics: PlatformAnalytics) : ViewModel
Link copied to clipboard

How the firmware applies a saved config section (firmware AdminModule::handleSetConfig / handleSetModuleConfig): most sections are applied with a node reboot a few seconds after the save is acked.

Link copied to clipboard
sealed class ResponseState<out T>

Generic sealed class defines each possible state of a response.

Link copied to clipboard
data class SecurityKeyBackupOption(val nodeNum: Int, val longName: String?, val timestamp: Long, val isCurrentNode: Boolean)

One stored key backup offered for restore; longName is null when the node DB no longer knows nodeNum.

Functions

Link copied to clipboard

Composable screen for cleaning the node database. Allows users to specify criteria for deleting nodes. The list of nodes to be deleted updates automatically as filter criteria change.

Link copied to clipboard
fun RadioConfigItemList(state: RadioConfigState, isManaged: Boolean, isOtaCapable: Boolean = false, onRouteClick: (Enum<*>) -> Unit = {}, onImport: () -> Unit = {}, onExport: () -> Unit = {}, databaseBackupAvailable: Boolean = true, onBackupDatabase: () -> Unit = {}, onRestoreDatabase: () -> Unit = {}, onNavigate: (Route) -> Unit)