PacketDao

interface PacketDao(source)

Functions

Link copied to clipboard
abstract suspend fun clearAllUnreadCounts()
Link copied to clipboard
abstract suspend fun clearUnreadCount(contact: String, timestamp: Long)
Link copied to clipboard
abstract suspend fun delete(uuid: Long)
open suspend fun delete(packet: Packet)
Link copied to clipboard
open suspend fun deleteAll()
Link copied to clipboard
abstract suspend fun deleteAllContactSettings()
Link copied to clipboard
abstract suspend fun deleteAllPackets()
Link copied to clipboard
abstract suspend fun deleteAllReactions()
Link copied to clipboard
abstract suspend fun deleteContacts(contactList: List<String>)
Link copied to clipboard
open suspend fun deleteMessages(uuidList: List<Long>)
Link copied to clipboard
abstract suspend fun deletePackets(uuidList: List<Long>)
Link copied to clipboard
abstract suspend fun deleteReactions(packetIds: List<Int>)
Link copied to clipboard
open suspend fun deleteWaypoint(id: Int)
Link copied to clipboard
abstract suspend fun findDataPacket(data: DataPacket): Packet?
Link copied to clipboard
abstract suspend fun findPacketBySfppHash(hash: ByteString): Packet?
Link copied to clipboard
abstract suspend fun findPacketsWithId(packetId: Int): List<Packet>
Link copied to clipboard
abstract suspend fun findReactionBySfppHash(hash: ByteString): ReactionEntity?
Link copied to clipboard
abstract suspend fun findReactionsWithId(packetId: Int): List<ReactionEntity>
Link copied to clipboard
abstract suspend fun getAllDataPackets(): List<DataPacket>
Link copied to clipboard
abstract fun getAllPackets(portNum: Int): Flow<List<Packet>>
Link copied to clipboard
abstract suspend fun getAllUserPacketsForMigration(): List<Packet>
Link copied to clipboard
abstract suspend fun getAllWaypoints(): List<Packet>
Link copied to clipboard
abstract suspend fun getContactFilteringDisabled(contact: String): Boolean?
Link copied to clipboard
abstract fun getContactKeys(): Flow<Map<String, Packet>>
Link copied to clipboard
Link copied to clipboard
abstract suspend fun getContactSettings(contact: String): ContactSettings?
Link copied to clipboard
abstract suspend fun getDataPackets(): List<DataPacket>
Link copied to clipboard
abstract suspend fun getFilteredCount(contact: String): Int
Link copied to clipboard
abstract fun getFilteredCountFlow(contact: String): Flow<Int>
Link copied to clipboard
abstract fun getFirstUnreadMessageUuid(contact: String): Flow<Long?>
Link copied to clipboard
abstract suspend fun getMessageCount(contact: String): Int
Link copied to clipboard
abstract fun getMessagesFrom(contact: String): Flow<List<PacketEntity>>
abstract fun getMessagesFrom(contact: String, includeFiltered: Boolean): Flow<List<PacketEntity>>
abstract fun getMessagesFrom(contact: String, limit: Int): Flow<List<PacketEntity>>
Link copied to clipboard
abstract fun getMessagesFromPaged(contact: String, includeFiltered: Boolean): PagingSource<Int, PacketEntity>
Link copied to clipboard
abstract suspend fun getPacketById(requestId: Int): Packet?
Link copied to clipboard
abstract suspend fun getPacketByPacketId(packetId: Int): PacketEntity?
Link copied to clipboard
abstract suspend fun getPacketIdsFrom(uuidList: List<Long>): List<Int>
Link copied to clipboard
abstract suspend fun getPacketsByPacketIds(packetIds: List<Int>): List<PacketEntity>
Link copied to clipboard
abstract suspend fun getReactionByPacketId(packetId: Int): ReactionEntity?
Link copied to clipboard
abstract suspend fun getUnreadCount(contact: String): Int
Link copied to clipboard
abstract fun getUnreadCountFlow(contact: String): Flow<Int>
Link copied to clipboard
abstract fun getUnreadCountTotal(): Flow<Int>
Link copied to clipboard
abstract fun hasUnreadMessages(contact: String): Flow<Boolean>
Link copied to clipboard
abstract suspend fun insert(packet: Packet)
abstract suspend fun insert(reaction: ReactionEntity)
Link copied to clipboard
abstract suspend fun insertContactSettingsIgnore(contacts: List<ContactSettings>)
Link copied to clipboard
open suspend fun migrateChannelsByPSK(oldSettings: List<ChannelSettings>, newSettings: List<ChannelSettings>)

One-time migration: Remap all message DataPacket.channel indices to new mapping using PSK after a channel reorder. For each Packet (with port_num = 1), finds the old PSK then sets the channel index to the matching newSettings index. Skips if PSKs do not match or are missing.

Link copied to clipboard
open suspend fun setContactFilteringDisabled(contact: String, disabled: Boolean)
Link copied to clipboard
open suspend fun setMuteUntil(contacts: List<String>, until: Long)
Link copied to clipboard
abstract suspend fun update(packet: Packet)
abstract suspend fun update(reaction: ReactionEntity)
Link copied to clipboard
abstract suspend fun updateFilteredBySender(senderIdPattern: String, filtered: Boolean)
Link copied to clipboard
open suspend fun updateMessageId(data: DataPacket, id: Int)
Link copied to clipboard
open suspend fun updateMessageStatus(data: DataPacket, m: MessageStatus)
Link copied to clipboard
abstract suspend fun updateMuteUntil(contactKeys: List<String>, muteUntil: Long)
Link copied to clipboard
abstract suspend fun upsertContactSettings(contacts: List<ContactSettings>)