tachiyomi/app/src/main/java/eu/kanade/tachiyomi/data/source/Source.kt

44 lines
1.1 KiB
Kotlin
Raw Normal View History

package eu.kanade.tachiyomi.data.source
import eu.kanade.tachiyomi.data.source.model.Page
2017-01-08 18:12:19 +01:00
import eu.kanade.tachiyomi.data.source.model.SChapter
import eu.kanade.tachiyomi.data.source.model.SManga
import rx.Observable
/**
* A basic interface for creating a source. It could be an online source, a local source, etc...
*/
interface Source {
/**
* Id for the source. Must be unique.
*/
2017-01-08 18:12:19 +01:00
val id: Long
/**
* Name of the source.
*/
val name: String
/**
* Returns an observable with the updated details for a manga.
*
* @param manga the manga to update.
*/
2017-01-08 18:12:19 +01:00
fun fetchMangaDetails(manga: SManga): Observable<SManga>
/**
* Returns an observable with all the available chapters for a manga.
*
* @param manga the manga to update.
*/
2017-01-08 18:12:19 +01:00
fun fetchChapterList(manga: SManga): Observable<List<SChapter>>
/**
* Returns an observable with the list of pages a chapter has.
*
* @param chapter the chapter.
*/
2017-01-08 18:12:19 +01:00
fun fetchPageList(chapter: SChapter): Observable<List<Page>>
}