LocalBookDataSourceApi

本地书本数据源接口 提供对本地存储的书本数据的增删改查操作

Since

Api 2

Functions

Link copied to clipboard
abstract suspend fun clear()

清空所有本地书本数据

Link copied to clipboard
abstract suspend fun getAllUserReadingData(): List<UserReadingData>

获取全部用户书本阅读数据

Link copied to clipboard
abstract suspend fun getBookInformation(id: String): BookInformation?

通过书本id获取本地存储的书本详情

Link copied to clipboard
abstract suspend fun getBookVolumes(id: String): BookVolumes?

通过书本id获取本地存储的书本卷目录

Link copied to clipboard
abstract suspend fun getChapterContent(id: String): ChapterContent?

通过章节id获取本地存储的章节内容

Link copied to clipboard
abstract suspend fun getUserReadingData(id: String): UserReadingData

获取用户书本阅读数据

Link copied to clipboard
abstract suspend fun isChapterContentExists(id: String): Boolean

判断指定章节内容是否在本地已缓存

Link copied to clipboard
abstract suspend fun updateBookInformation(info: BookInformation)

更新或写入本地书本详情

Link copied to clipboard
abstract suspend fun updateBookVolumes(bookVolumes: BookVolumes)

更新或写入本地书本卷目录

Link copied to clipboard
abstract suspend fun updateChapterContent(chapterContent: ChapterContent)

更新或写入本地章节内容

Link copied to clipboard
abstract suspend fun updateUserReadingData(id: String, update: (UserReadingData) -> UserReadingData)

更新用户书本阅读数据