P2PImpl

class P2PImpl(db: CoroutineDatabase) : P2PDataSource

Implementation of the P2PDataSource interface for handling peer-to-peer messages and location information.

Parameters

db

the CoroutineDatabase instance representing the database.

Constructors

Link copied to clipboard
constructor(db: CoroutineDatabase)

Functions

Link copied to clipboard
open suspend override fun getAllMessages(from: String?, to: String?): List<P2PMessage>

Retrieves all P2P messages from the data source.

Link copied to clipboard
open suspend override fun getLocationMessage(from: String?): List<LocationMessage>?

Retrieves all location messages from the data source.

Link copied to clipboard
open suspend override fun insertLocation(location: LocationMessage)

Inserts a new location message into the data source.

Link copied to clipboard
open suspend override fun insertMessages(message: P2PMessage)

Inserts a new P2P message into the data source.