MeshLogRepositoryImpl

class MeshLogRepositoryImpl(dbManager: ERROR CLASS: Symbol not found for DatabaseProvider, dispatchers: ERROR CLASS: Symbol not found for CoroutineDispatchers, meshLogPrefs: ERROR CLASS: Symbol not found for MeshLogPrefs, nodeInfoReadDataSource: NodeInfoReadDataSource) : <ERROR CLASS> ERROR CLASS: Symbol not found for MeshLogRepository(source)

Repository implementation for managing and retrieving logs from the local database.

This repository provides methods for inserting, deleting, and querying logs, including specialized methods for telemetry and traceroute data.

Constructors

Link copied to clipboard
constructor(dbManager: ERROR CLASS: Symbol not found for DatabaseProvider, dispatchers: ERROR CLASS: Symbol not found for CoroutineDispatchers, meshLogPrefs: ERROR CLASS: Symbol not found for MeshLogPrefs, nodeInfoReadDataSource: NodeInfoReadDataSource)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun deleteAll(): ERROR CLASS: Unresolved name: withContext

Clears all logs from the database.

Link copied to clipboard
open suspend override fun deleteLog(uuid: String): ERROR CLASS: Unresolved name: withContext

Deletes a specific log entry by its uuid.

Link copied to clipboard
open suspend override fun deleteLogs(nodeNum: Int, portNum: Int): ERROR CLASS: Unresolved name: withContext

Deletes all logs associated with a specific nodeNum and portNum.

Link copied to clipboard
open suspend override fun deleteLogsOlderThan(retentionDays: Int): ERROR CLASS: Unresolved name: withContext

Prunes the log database based on the configured retentionDays.

Link copied to clipboard
open override fun getAllLogs(maxItem: Int): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshLog>>

Retrieves all MeshLogs in the database, up to maxItem.

Link copied to clipboard
open override fun getAllLogsInReceiveOrder(maxItem: Int): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshLog>>

Retrieves all MeshLogs in the database in the order they were received.

Link copied to clipboard
open override fun getAllLogsUnbounded(): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshLog>>

Retrieves all MeshLogs in the database without any limit.

Link copied to clipboard
open override fun getLogsFrom(nodeNum: Int, portNum: Int): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshLog>>

Retrieves all MeshLogs associated with a specific nodeNum and portNum.

Link copied to clipboard
open override fun getMeshPacketsFrom(nodeNum: Int, portNum: Int): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshPacket>>

Retrieves all MeshLogs containing MeshPackets for a specific nodeNum.

Link copied to clipboard
open override fun getMyNodeInfo(): ERROR CLASS: Symbol not found for Flow<ERROR CLASS: Symbol not found for MyNodeInfo?>

Returns the cached MyNodeInfo from the system logs.

Link copied to clipboard
open override fun getRequestLogs(targetNodeNum: Int, portNum: ERROR CLASS: Symbol not found for PortNum): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for MeshLog>>

Retrieves all outgoing request logs for a specific targetNodeNum and portNum.

Link copied to clipboard
open override fun getTelemetryFrom(nodeNum: Int): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<ERROR CLASS: Symbol not found for Telemetry>>

Retrieves telemetry history for a specific node, automatically handling local node redirection.

Link copied to clipboard
open suspend override fun insert(log: ERROR CLASS: Symbol not found for MeshLog): ERROR CLASS: Unresolved name: withContext

Persists a new log entry to the database if logging is enabled in preferences.