android-components / mozilla.components.browser.storage.sync / PlacesStorage

PlacesStorage

abstract class PlacesStorage : Storage, SyncableStore (source)

A base class for concrete implementations of PlacesStorages

Constructors

Name Summary
<init> PlacesStorage(context: <ERROR CLASS>)
A base class for concrete implementations of PlacesStorages

Properties

Name Summary
logger abstract val logger: Logger

Functions

Name Summary
cleanup open fun cleanup(): Unit
Cleans up background work and database connections
ignoreUrlExceptions fun ignoreUrlExceptions(operation: String, block: () -> Unit): Unit
Runs block described by operation, ignoring and logging any thrown UrlParseFailed exceptions.
runMaintenance open suspend fun runMaintenance(): Unit
Internal database maintenance tasks. Ideally this should be called once a day.
syncAndHandleExceptions fun syncAndHandleExceptions(syncBlock: () -> Unit): SyncStatus
Runs a syncBlock, re-throwing any panics that may be encountered.

Inherited Functions

Name Summary
getHandle abstract fun getHandle(): Long
This should be removed. See: https://github.com/mozilla/application-services/issues/1877
sync abstract suspend fun sync(authInfo: SyncAuthInfo): SyncStatus
Performs a sync.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.

Inheritors

Name Summary
PlacesBookmarksStorage open class PlacesBookmarksStorage : PlacesStorage, BookmarksStorage, SyncableStore
Implementation of the BookmarksStorage which is backed by a Rust Places lib via PlacesApi.
PlacesHistoryStorage open class PlacesHistoryStorage : PlacesStorage, HistoryStorage, SyncableStore
Implementation of the HistoryStorage which is backed by a Rust Places lib via PlacesApi.