android-components / mozilla.components.concept.storage / HistoryStorage

HistoryStorage

interface HistoryStorage (source)

An interface which defines read/write methods for history data.

Functions

cleanup

abstract fun cleanup(): Unit

Cleanup any allocated resources.

getSuggestions

abstract fun getSuggestions(query: String, limit: Int): List<SearchResult>

Retrieves suggestions matching the query.

getVisited

abstract fun getVisited(uris: List<String>): Deferred<List<Boolean>>

Maps a list of page URIs to a list of booleans indicating if each URI was visited.

abstract fun getVisited(): Deferred<List<String>>

Retrieves a list of all visited pages.

recordObservation

abstract suspend fun recordObservation(uri: String, observation: PageObservation): Unit

Records an observation about a page.

recordVisit

abstract suspend fun recordVisit(uri: String, visitType: VisitType): Unit

Records a visit to a page.

Inheritors

InMemoryHistoryStorage

class InMemoryHistoryStorage : HistoryStorage

An in-memory implementation of mozilla.components.concept.storage.HistoryStorage.

PlacesHistoryStorage

open class PlacesHistoryStorage : HistoryStorage

Implementation of the HistoryStorage which is backed by a Rust Places lib via PlacesConnection.