HistoryDataProvider

interface HistoryDataProvider : LocalDataProvider<HistoryRecord>

LocalDataProvider typed to store HistoryRecord items.

Instance of HistoryDataProvider can be retrieved from MapboxSearchSdk.serviceProvider.

See also

Functions

add
Link copied to clipboard
abstract fun add(record: HistoryRecord, callback: IndexableDataProvider.CompletionCallback<Unit>): AsyncOperationTask
Adds a record to this data provider.
addAll
Link copied to clipboard
abstract fun addAll(records: List<HistoryRecord>, callback: IndexableDataProvider.CompletionCallback<Unit>): AsyncOperationTask
Add multiple records to this data provider.
addOnDataChangedListener
Link copied to clipboard
abstract fun addOnDataChangedListener(listener: LocalDataProvider.OnDataChangedListener<HistoryRecord>)
Adds a listener to be notified of data provider changes.
clear
Link copied to clipboard
abstract fun clear(callback: IndexableDataProvider.CompletionCallback<Unit>): AsyncOperationTask
Removes all the records in this data provider.
contains
Link copied to clipboard
abstract fun contains(id: String, callback: IndexableDataProvider.CompletionCallback<Boolean>): AsyncOperationTask
Checks whether this data provider contains a record with specified id.
get
Link copied to clipboard
abstract fun get(id: String, callback: IndexableDataProvider.CompletionCallback<in HistoryRecord?>): AsyncOperationTask
Retrieves the record with specified id or null if there's no such record.
getAll
Link copied to clipboard
abstract fun getAll(callback: IndexableDataProvider.CompletionCallback<List<HistoryRecord>>): AsyncOperationTask
Retrieves all records from this provider.
remove
Link copied to clipboard
abstract fun remove(id: String, callback: IndexableDataProvider.CompletionCallback<Boolean>): AsyncOperationTask
Removes the record with specified id.
removeOnDataChangedListener
Link copied to clipboard
abstract fun removeOnDataChangedListener(listener: LocalDataProvider.OnDataChangedListener<HistoryRecord>)
Removes listener to stop being notified of data provider changes.
update
Link copied to clipboard
abstract fun update(record: HistoryRecord, callback: IndexableDataProvider.CompletionCallback<Unit>): AsyncOperationTask
Updates record in this data provider.

Properties

dataProviderName
Link copied to clipboard
abstract val dataProviderName: String
Data provider name.