ImageDataSource

interface ImageDataSource

Interface representing a data source for managing Image objects. This data source could be local storage, a remote server, or another image storage solution.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun create(image: Image)

Creates a new Image in the data source.

Link copied to clipboard
abstract suspend fun delete()

Deletes all images in the data source.

Link copied to clipboard
abstract fun retrieve(): Flow<List<Image>>

Retrieves all available Image objects from the data source as a stream of lists using Kotlin's Flow API.

Retrieves a stream (Flow) of pairs containing an Image object and a possibly missing AdministrativeUnitName object. This flow emits whenever a new image is created or the associated administrative unit name is updated.