Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Device links moved from the bundled urls.json to the resolved API; original_url is no longer stored.

Link copied to clipboard
class BusyTimeoutSQLiteDriver(delegate: SQLiteDriver, busyTimeoutMs: Long = DEFAULT_BUSY_TIMEOUT_MS) : SQLiteDriver

Wraps a SQLiteDriver so every connection it opens waits up to busyTimeoutMs for a competing connection's lock instead of failing immediately with SQLITE_BUSY ("Error code: 5, message: database is locked").

Link copied to clipboard
Link copied to clipboard

Pure rules for backing up and restoring the app database: file naming, header validation and staging paths.

Link copied to clipboard

What the settings screen needs from a database backup, so a test can stand in for the file-backed service.

Link copied to clipboard

Copies a device database out to a user-chosen sink, and stages a validated backup to replace it the next time that database is opened. A restore is never applied to an open database.

Link copied to clipboard
Link copied to clipboard

Manages per-device Room database instances for node data, with LRU eviction.

Link copied to clipboard
Link copied to clipboard

A bounded one-shot database operation did not finish within its deadline and was abandoned, never replayed.

Link copied to clipboard

Provides multiplatform access to the current MeshtasticDatabase and a safe transactional helper. Platform implementations manage the concrete lifecycle (Room on Android, etc.).

Link copied to clipboard

A device database a query found corrupt in an earlier session, moved aside on its next open.

Link copied to clipboard

Signals that a database-backed Flow never produced its first value, i.e. the Room pool is not serving queries.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun buildDbName(address: String?): String
Link copied to clipboard

Creates an Android DataStore for database preferences.

Creates a platform-specific DataStore for database-related preferences.

Creates a JVM DataStore for database preferences in the data directory.

Link copied to clipboard
actual fun deleteDatabase(dbName: String)

Deletes the Android database using the platform-specific deleteDatabase helper.

expect fun deleteDatabase(dbName: String)

Deletes the database with the given dbName and its associated files (e.g., -wal, -shm).

actual fun deleteDatabase(dbName: String)

Deletes the database and its Room-associated files on JVM.

Link copied to clipboard

Resolves the desktop data directory for persistent storage (DataStore files, Room database). Defaults to ~/.meshtastic/. Override via MESHTASTIC_DATA_DIR environment variable.

Link copied to clipboard

Returns a RoomDatabase.Builder configured for Android with the given dbName. The pool and query context are set for every platform in MeshtasticDatabase.configureCommon.

Returns a RoomDatabase.Builder configured for the current platform with the given dbName.

Returns a RoomDatabase.Builder configured for JVM/Desktop with the given dbName.

Link copied to clipboard
actual fun getDatabaseDirectory(): Path

Returns the Android directory where database files are stored.

expect fun getDatabaseDirectory(): Path

Returns the platform-specific directory where database files are stored.

actual fun getDatabaseDirectory(): Path

Returns the JVM/Desktop directory where database files are stored.

Link copied to clipboard
actual fun getDatabaseFile(dbName: String): Path

Returns the Android path of the main database file for dbName.

expect fun getDatabaseFile(dbName: String): Path

Returns the path of the main database file for dbName; its -wal and -shm files sit beside it.

actual fun getDatabaseFile(dbName: String): Path

Returns the JVM/Desktop path of the main database file for dbName.

Link copied to clipboard
actual fun getFileSystem(): FileSystem

Returns the system FileSystem for Android.

expect fun getFileSystem(): FileSystem

Returns the FileSystem to use for database file operations.

actual fun getFileSystem(): FileSystem

Returns the system FileSystem for JVM.

Link copied to clipboard

Returns a RoomDatabase.Builder configured for an in-memory Android database.

Returns a RoomDatabase.Builder configured for an in-memory database on the current platform.

Returns a RoomDatabase.Builder configured for an in-memory JVM database.

Link copied to clipboard
fun <T> Flow<T>.retryOnDbPoolFailure(label: String): Flow<T>

Restarts a database-backed Flow after the Room pool wedge behind #6608 surfaces as a DbFlowStalledException, with capped exponential backoff. The backoff resets after a successful emission; every other failure propagates.

Link copied to clipboard