mirror of https://git.sr.ht/~oppen/ariane
15 lines
424 B
Kotlin
15 lines
424 B
Kotlin
package oppen.gem.io.bookmarks
|
|
|
|
import android.content.Context
|
|
|
|
interface BookmarksDatasource {
|
|
fun get(onBookmarks: (List<Bookmark>) -> Unit)
|
|
fun add(bookmark: Bookmark, onAdded: () -> Unit)
|
|
fun delete(bookmark: Bookmark, onDelete: () -> Unit)
|
|
|
|
companion object{
|
|
fun getDefault(applicationContext: Context): BookmarksDatasource{
|
|
return RoomBookmarks(applicationContext)
|
|
}
|
|
}
|
|
} |