### Example Implementation of CatalogueSource Source: https://context7.com/komikku-app/komikku/llms.txt An example demonstrating how to implement the CatalogueSource interface for a custom manga source. It includes basic implementations for fetching popular manga and search results, along with defining available filters. ```kotlin // Example usage in an extension class MyMangaSource : CatalogueSource { override val id = 1234567890L override val name = "My Manga Source" override val lang = "en" override val supportsLatest = true override suspend fun getPopularManga(page: Int): MangasPage { val response = client.newCall(popularMangaRequest(page)).await() return MangasPage( mangas = parsePopularManga(response), hasNextPage = page < 10 ) } override suspend fun getSearchManga(page: Int, query: String, filters: FilterList): MangasPage { val url = "$baseUrl/search?q=$query&page=$page" val response = client.newCall(GET(url, headers)).await() return parseSearchResults(response) } override fun getFilterList() = FilterList( Filter.Header("Filters"), GenreFilter(), StatusFilter(), SortFilter() ) } ``` -------------------------------- ### SimpleMangaSource Example Implementation Source: https://context7.com/komikku-app/komikku/llms.txt An example implementation of ParsedHttpSource for a fictional 'Simple Manga' website. It provides concrete CSS selectors and parsing logic for various manga-related data. ```kotlin // Example ParsedHttpSource implementation class SimpleMangaSource : ParsedHttpSource() { override val name = "Simple Manga" override val baseUrl = "https://simplemanga.com" override val lang = "en" override val supportsLatest = true // Popular manga override fun popularMangaRequest(page: Int) = GET("$baseUrl/popular/$page") override fun popularMangaSelector() = "div.manga-list > div.item" override fun popularMangaNextPageSelector() = "a.pagination-next" override fun popularMangaFromElement(element: Element) = SManga.create().apply { setUrlWithoutDomain(element.select("a").attr("href")) title = element.select("h3").text() thumbnail_url = element.select("img").attr("data-src") } // Search manga override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { val url = "$baseUrl/search".toHttpUrl().newBuilder() .addQueryParameter("q", query) .addQueryParameter("page", page.toString()) .build() return GET(url, headers) } override fun searchMangaSelector() = popularMangaSelector() override fun searchMangaNextPageSelector() = popularMangaNextPageSelector() override fun searchMangaFromElement(element: Element) = popularMangaFromElement(element) // Latest updates override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/latest/$page") override fun latestUpdatesSelector() = popularMangaSelector() override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector() override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element) // Manga details override fun mangaDetailsParse(document: Document) = SManga.create().apply { title = document.select("h1.manga-title").text() author = document.select("div.author a").text() description = document.select("div.synopsis p").text() genre = document.select("div.genres a").joinToString { it.text() } status = when (document.select("span.status").text().lowercase()) { "ongoing" -> SManga.ONGOING "completed" -> SManga.COMPLETED else -> SManga.UNKNOWN } thumbnail_url = document.select("div.cover img").attr("src") } // Chapter list override fun chapterListSelector() = "ul.chapter-list li" override fun chapterFromElement(element: Element) = SChapter.create().apply { setUrlWithoutDomain(element.select("a").attr("href")) name = element.select("span.chapter-title").text() date_upload = element.select("span.date").attr("data-timestamp").toLongOrNull() ?: 0L } // Page list override fun pageListParse(document: Document): List { return document.select("div.reader-container img").mapIndexed { i, img -> Page(i, imageUrl = img.attr("data-src")) } } override fun imageUrlParse(document: Document) = throw UnsupportedOperationException() } ``` -------------------------------- ### Example HttpSource Implementation Source: https://context7.com/komikku-app/komikku/llms.txt An example implementation of the HttpSource abstract class. This class demonstrates how to override abstract methods to fetch and parse manga data from a specific website. ```kotlin class ExampleSource : HttpSource() { override val name = "Example Manga" override val baseUrl = "https://example.com" override val lang = "en" override val supportsLatest = true override fun popularMangaRequest(page: Int): Request { return GET("$baseUrl/popular?page=$page", headers) } override fun popularMangaParse(response: Response): MangasPage { val document = response.asJsoup() val mangas = document.select("div.manga-item").map { SManga.create().apply { url = it.select("a").attr("href") title = it.select("h3").text() thumbnail_url = it.select("img").attr("src") } } val hasNext = document.select("a.next-page").isNotEmpty() return MangasPage(mangas, hasNext) } override fun mangaDetailsParse(response: Response): SManga { val document = response.asJsoup() return SManga.create().apply { title = document.select("h1.title").text() author = document.select("span.author").text() artist = document.select("span.artist").text() description = document.select("div.description").text() genre = document.select("span.genre").joinToString { it.text() } status = parseStatus(document.select("span.status").text()) thumbnail_url = document.select("img.cover").attr("src") } } override fun chapterListParse(response: Response): List { return response.asJsoup().select("div.chapter-item").map { SChapter.create().apply { url = it.select("a").attr("href") name = it.select("span.chapter-name").text() date_upload = parseDate(it.select("span.date").text()) } } } override fun pageListParse(response: Response): List { return response.asJsoup().select("img.page-image").mapIndexed { index, element -> Page(index, imageUrl = element.attr("src")) } } } ``` -------------------------------- ### Manga Screen ViewModel Example Source: https://context7.com/komikku-app/komikku/llms.txt Example usage of domain interactors within a ViewModel for managing manga chapters and details. ```kotlin class MangaScreenModel( private val mangaId: Long, private val getChaptersByMangaId: GetChaptersByMangaId, private val setReadStatus: SetReadStatus, private val updateManga: UpdateManga ) : ScreenModel { val chapters = getChaptersByMangaId.subscribe(mangaId) .stateIn(screenModelScope, SharingStarted.Lazily, emptyList()) fun markChapterRead(chapter: Chapter) { screenModelScope.launch { setReadStatus.await(read = true, chapter) } } fun refreshMangaInfo(manga: Manga, source: Source) { screenModelScope.launch { try { val remoteManga = source.getMangaDetails(manga.toSManga()) updateManga.awaitUpdateFromSource(manga, remoteManga, manualFetch = true) } catch (e: Exception) { // Handle error } } } } ``` -------------------------------- ### SimpleMangaSource Implementation Source: https://context7.com/komikku-app/komikku/llms.txt An example implementation of the `ParsedHttpSource` abstract class, demonstrating how to define selectors and parsing logic for a specific manga website. ```APIDOC ## SimpleMangaSource Implementation ### Description An example implementation of `ParsedHttpSource` for a hypothetical manga website 'simplemanga.com'. This class provides concrete implementations for all abstract methods, defining how to fetch and parse data for popular manga, search results, latest updates, manga details, and chapters. ### Class Properties - `name`: "Simple Manga" - `baseUrl`: "https://simplemanga.com" - `lang`: "en" - `supportsLatest`: `true` ### Methods - **Popular Manga**: - `popularMangaRequest(page: Int)`: Returns a `GET` request for the popular manga page. - `popularMangaSelector()`: Returns `"div.manga-list > div.item"`. - `popularMangaNextPageSelector()`: Returns `"a.pagination-next"`. - `popularMangaFromElement(element)`: Extracts title, URL, and thumbnail from the provided element. - **Search Manga**: - `searchMangaRequest(page: Int, query: String, filters: FilterList)`: Constructs a `GET` request with query parameters for searching manga. - `searchMangaSelector()`: Uses `popularMangaSelector()`. - `searchMangaNextPageSelector()`: Uses `popularMangaNextPageSelector()`. - `searchMangaFromElement(element)`: Uses `popularMangaFromElement()`. - **Latest Updates**: - `latestUpdatesRequest(page: Int)`: Returns a `GET` request for the latest updates page. - `latestUpdatesSelector()`: Uses `popularMangaSelector()`. - `latestUpdatesNextPageSelector()`: Uses `popularMangaNextPageSelector()`. - `latestUpdatesFromElement(element)`: Uses `popularMangaFromElement()`. - **Manga Details Parsing**: - `mangaDetailsParse(document: Document)`: Parses the document to extract manga title, author, description, genre, status, and thumbnail URL. - **Chapter List Parsing**: - `chapterListSelector()`: Returns `"ul.chapter-list li"`. - `chapterFromElement(element)`: Extracts chapter name, URL, and upload date from the provided element. - **Page List Parsing**: - `pageListParse(document: Document)`: Parses the document to extract image URLs for each page in a chapter. - **Image URL Parsing**: - `imageUrlParse(document: Document)`: Throws `UnsupportedOperationException` as image URLs are extracted directly in `pageListParse`. ``` -------------------------------- ### CoroutineStart API Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Defines the start behavior of coroutines. ```APIDOC ## CoroutineStart API ### Description Defines the start behavior of coroutines, such as whether they start immediately, lazily, or with a specific policy. Includes methods to check for lazy start and to invoke coroutines with a specific start policy. ### Methods #### `isLazy()Z` Checks if the coroutine start policy is lazy. #### `values()[Lkotlinx/coroutines/CoroutineStart;` Returns an array of all possible CoroutineStart values. #### `invoke(Function2, Object> function, P1 p1, Continuation $completion)Object` Invokes the given function with the specified parameters and continuation, applying the CoroutineStart policy. ### Related Classes - `CoroutineStart.WhenMappings` ``` -------------------------------- ### AppCompatDelegateImpl.Api24Impl Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Details methods for the Api24Impl class within AppCompatDelegateImpl, specifically for getting locales. ```APIDOC ## POST /komikku-app/komikku/appcompat/delegate/api24impl/getLocales ### Description Gets the locales from a Configuration object using Api24Impl. ### Method POST ### Endpoint /komikku-app/komikku/appcompat/delegate/api24impl/getLocales ### Parameters #### Request Body - **configuration** (Configuration) - Required - The configuration object. ### Response #### Success Response (200) - **locales** (LocaleListCompat) - The list of locales. #### Response Example ```json { "locales": "LocaleListCompat object" } ``` ``` -------------------------------- ### WindowCompat API Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Methods for configuring window decorations and system window inset behavior. ```APIDOC ## POST /api/windowcompat/decorfitsystemwindows ### Description Configures whether the window's decor view should fit system windows. ### Method POST ### Endpoint /api/windowcompat/decorfitsystemwindows ### Parameters #### Request Body - **window** (Window) - Required - The window to configure. - **decorFitsSystemWindows** (Boolean) - Required - True to make the decor view fit system windows, false otherwise. ### Response #### Success Response (200) - **status** (string) - Indicates success or failure. ``` -------------------------------- ### AppCompatActivity Callbacks and Initialization Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Details on the initialization and state saving mechanisms for AppCompatActivity within the Komikku app. ```APIDOC ## AppCompatActivity Callbacks and Initialization ### Description This section details the internal workings of `AppCompatActivity` within the Komikku application, including its constructor, state saving, and callback handling. ### Methods #### `androidx.appcompat.app.AppCompatActivity$1.(Leu.kanade.tachiyomi.ui.base.activity.BaseActivity)` - **Description**: Constructor for the anonymous inner class `AppCompatActivity$1`. - **Parameters**: - `baseActivity` (Leu.kanade.tachiyomi.ui.base.activity.BaseActivity) - The base activity instance. #### `androidx.appcompat.app.AppCompatActivity$1.saveState()` - **Description**: Saves the current state of the activity. - **Returns**: `android.os.Bundle` - The bundle containing the saved state. ``` -------------------------------- ### Layout ID Functions Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Functions for getting and setting layout IDs. ```APIDOC ## Layout ID Functions ### Description Functions for getting and setting layout IDs. ### Methods - `getLayoutId(measurable: Measurable): Any` - `layoutId(modifier: Modifier, id: Any): Modifier` ### Parameters - `measurable` (Measurable) - Required - The measurable to get the ID from. - `modifier` (Modifier) - Required - The modifier to apply the layout ID to. - `id` (Any) - Required - The layout ID to set. ### Returns - `Any` - The layout ID. - `Modifier` - The modified modifier. ``` -------------------------------- ### AppCompatDelegateImpl Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt This section details various methods available in the AppCompatDelegateImpl class, including setting content view, title, and handling window insets. ```APIDOC ## POST /komikku-app/komikku/appcompat/delegate/setContentView ### Description Sets the content view for the AppCompatDelegateImpl. ### Method POST ### Endpoint /komikku-app/komikku/appcompat/delegate/setContentView ### Parameters #### Request Body - **view** (View) - Required - The view to set as content. - **layoutParams** (ViewGroup.LayoutParams) - Required - The layout parameters for the view. ### Response #### Success Response (200) - **status** (string) - Indicates success. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## POST /komikku-app/komikku/appcompat/delegate/setTitle ### Description Sets the title for the AppCompatDelegateImpl. ### Method POST ### Endpoint /komikku-app/komikku/appcompat/delegate/setTitle ### Parameters #### Request Body - **title** (CharSequence) - Required - The title to set. ### Response #### Success Response (200) - **status** (string) - Indicates success. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## POST /komikku-app/komikku/appcompat/delegate/throwFeatureRequestIfSubDecorInstalled ### Description Throws a feature request if the sub-decor has been installed in AppCompatDelegateImpl. ### Method POST ### Endpoint /komikku-app/komikku/appcompat/delegate/throwFeatureRequestIfSubDecorInstalled ### Response #### Success Response (200) - **status** (string) - Indicates success. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## POST /komikku-app/komikku/appcompat/delegate/updateStatusGuard ### Description Updates the status guard in AppCompatDelegateImpl with WindowInsetsCompat and Rect. ### Method POST ### Endpoint /komikku-app/komikku/appcompat/delegate/updateStatusGuard ### Parameters #### Request Body - **insets** (WindowInsetsCompat) - Required - The window insets. - **rect** (Rect) - Required - The rectangle. ### Response #### Success Response (200) - **result** (int) - The result of the update. #### Response Example ```json { "result": 0 } ``` ``` -------------------------------- ### CollectionsKt__IterablesKt - Iterable Utilities Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Provides utilities for working with Iterables, such as getting collection size. ```APIDOC ## collectionSizeOrDefault ### Description Gets the size of a collection, returning a default value if it's null or empty. ### Method Extension Function ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin val iterable: Iterable = listOf("a", "b") val size = iterable.collectionSizeOrDefault(0) ``` ### Response #### Success Response (200) - **size** (Int) - The size of the collection or the default value. #### Response Example ```json { "size": 2 } ``` ``` ```APIDOC ## collectionSizeOrNull ### Description Gets the size of a collection, returning null if it's empty. ### Method Extension Function ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin val iterable: Iterable = listOf("a", "b") val size = iterable.collectionSizeOrNull() ``` ### Response #### Success Response (200) - **size** (Integer) - The size of the collection or null if empty. #### Response Example ```json { "size": 2 } ``` ``` ```APIDOC ## flatten ### Description Flattens a nested iterable into a single list. ### Method Extension Function ### Endpoint N/A (Kotlin function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin val nestedList = listOf(listOf(1, 2), listOf(3, 4)) val flattenedList = nestedList.flatten() ``` ### Response #### Success Response (200) - **flattenedList** (List) - A single list containing all elements from the nested iterables. #### Response Example ```json { "flattenedList": [1, 2, 3, 4] } ``` ``` -------------------------------- ### Get Categories Interactor Source: https://context7.com/komikku-app/komikku/llms.txt Use this interactor to retrieve a list of categories. It can be subscribed to for real-time updates or fetched once. ```kotlin class GetCategories(private val categoryRepository: CategoryRepository) { fun subscribe(): Flow> { return categoryRepository.getAllAsFlow() } suspend fun await(): List { return categoryRepository.getAll() } } ``` -------------------------------- ### WindowInsetsCompat Impl20 Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Details the constructor and methods for WindowInsetsCompat Impl20, which handles window insets for API level 20. ```APIDOC ## WindowInsetsCompat Impl20 ### Description Implementation for API level 20. ### Methods #### Constructor - `WindowInsetsCompat$Impl20(WindowInsetsCompat, WindowInsets)`: Initializes the Impl20 object. #### `getSystemWindowInsets()` - Returns: `Insets` - The system window insets. #### `setOverriddenInsets(Insets[] insets)` - Parameters: - `insets` (Insets[]): An array of Insets to set as overridden. #### `setRootWindowInsets(WindowInsetsCompat insets)` - Parameters: - `insets` (WindowInsetsCompat): The root window insets to set. ``` -------------------------------- ### DiskLruCache Operations Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Provides details on operations related to DiskLruCache, including editing, getting entries, and journal management. ```APIDOC ## DiskLruCache Operations ### Description This section details the methods available for interacting with the DiskLruCache, a component used for caching data on disk. ### Methods - **edit$default**: Overloaded method for editing cache entries. - **edit**: Edits an existing cache entry. - **get**: Retrieves a cache snapshot for a given key. - **initialize**: Initializes the DiskLruCache. - **journalRebuildRequired**: Checks if the journal needs rebuilding. - **rebuildJournal$okhttp**: Rebuilds the cache journal. - **validateKey**: Validates a given cache key. ``` -------------------------------- ### WindowInsetsControllerCompat Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Details the constructor and methods for WindowInsetsControllerCompat. ```APIDOC ## WindowInsetsControllerCompat ### Description Controller for managing window insets. ### Methods #### Constructor - `WindowInsetsControllerCompat(View view, Window window)`: Initializes the controller. ``` -------------------------------- ### Change Application ID in build.gradle.kts Source: https://github.com/komikku-app/komikku/blob/master/CONTRIBUTING.md To avoid installation conflicts when creating a fork, change the `applicationId` in the `build.gradle.kts` file. ```kotlin android { namespace = "eu.kanade.tachiyomi.test" defaultConfig { applicationId = "eu.kanade.tachiyomi.test" // ... } // ... } ``` -------------------------------- ### WindowInsetsCompat.Builder API Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt APIs for building WindowInsetsCompat objects. ```APIDOC ## POST /api/windowinsetscompat/builder/create ### Description Creates a new builder for WindowInsetsCompat. ### Method POST ### Endpoint /api/windowinsetscompat/builder/create ### Parameters #### Request Body - **windowInsetsCompat** (WindowInsetsCompat) - Optional - An existing WindowInsetsCompat to initialize the builder with. ### Response #### Success Response (200) - **builder** (WindowInsetsCompat.Builder) - The created builder. ## POST /api/windowinsetscompat/builder/applyinsettypes ### Description Applies inset types to the builder. ### Method POST ### Endpoint /api/windowinsetscompat/builder/applyinsettypes ### Parameters #### Request Body - **builder** (WindowInsetsCompat.Builder) - Required - The builder to modify. ### Response #### Success Response (200) - **status** (string) - Indicates success or failure. ## POST /api/windowinsetscompat/builder29/create ### Description Creates a new builder for WindowInsetsCompat for API 29. ### Method POST ### Endpoint /api/windowinsetscompat/builder29/create ### Parameters #### Request Body - None ### Response #### Success Response (200) - **builder** (WindowInsetsCompat.BuilderImpl29) - The created builder. ## POST /api/windowinsetscompat/builder29/build ### Description Builds a WindowInsetsCompat object using the BuilderImpl29. ### Method POST ### Endpoint /api/windowinsetscompat/builder29/build ### Parameters #### Request Body - **builder** (WindowInsetsCompat.BuilderImpl29) - Required - The builder to use. ### Response #### Success Response (200) - **windowInsetsCompat** (WindowInsetsCompat) - The built WindowInsetsCompat object. ## POST /api/windowinsetscompat/builder30/create ### Description Creates a new builder for WindowInsetsCompat for API 30. ### Method POST ### Endpoint /api/windowinsetscompat/builder30/create ### Parameters #### Request Body - None ### Response #### Success Response (200) - **builder** (WindowInsetsCompat.BuilderImpl30) - The created builder. ``` -------------------------------- ### WindowInsetsControllerCompat Impl30 Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Details the constructor and methods for WindowInsetsControllerCompat Impl30. ```APIDOC ## WindowInsetsControllerCompat Impl30 ### Description Implementation for WindowInsetsControllerCompat for API level 30. ### Methods #### Constructor - `WindowInsetsControllerCompat$Impl30(Window window, HintHandler hintHandler)`: Initializes the Impl30 object. - `WindowInsetsControllerCompat$Impl30(WindowInsetsController controller, HintHandler hintHandler)`: Initializes the Impl30 object. ``` -------------------------------- ### Get Manga Chapters Interactor Source: https://context7.com/komikku-app/komikku/llms.txt Use this interactor to fetch manga chapters by ID, either as a one-time operation or as a continuous flow. ```kotlin class GetChaptersByMangaId(private val chapterRepository: ChapterRepository) { suspend fun await(mangaId: Long): List { return chapterRepository.getChapterByMangaId(mangaId) } fun subscribe(mangaId: Long): Flow> { return chapterRepository.getChapterByMangaIdAsFlow(mangaId) } } ``` -------------------------------- ### Coroutine Builders: async and launch Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Provides documentation for the async and launch coroutine builders, including their default and standard versions. ```APIDOC ## Coroutine Builders: async and launch ### Description These functions are used to start new coroutines. `async` starts a coroutine that returns a result, while `launch` starts a coroutine that does not return a result. ### Methods - `async$default` - `async` - `launch$default` - `launch` ### Parameters - **CoroutineScope**: The scope in which the coroutine will run. - **CoroutineContext**: The coroutine context to combine with the default context. - **CoroutineStart**: The start mode for the coroutine. - **Function2**: The block of code to execute in the coroutine. - **Int**: An integer parameter (likely for default value handling). - **Object**: An object parameter (likely for default value handling). ### Returns - `Deferred` for `async` functions (representing a future result). - `Job` for `launch` functions (representing a cancellable unit of work). ### Examples ```kotlin // Example for async val deferredResult: Deferred = GlobalScope.async { // Coroutine code here "Result from async" } // Example for launch val job: Job = GlobalScope.launch { // Coroutine code here } ``` ``` -------------------------------- ### EventListener API Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Details on the EventListener for monitoring network call events, including methods for tracking call lifecycle events like start, end, connection, and cache events. ```APIDOC ## EventListener API ### Description Listens for and records events that occur during an OkHttp call. ### Methods - **`EventListener()`**: Constructor for `EventListener`. - **`cacheMiss(Call)`**: Called when a cache miss occurs. - **`callEnd(Call)`**: Called when a call completes successfully. - **`callStart(Call)`**: Called when a call begins. - **`connectEnd(Call, InetSocketAddress, Proxy, Protocol)`**: Called when a connection to a host is established. - **`connectFailed(Call, InetSocketAddress, Proxy, Protocol, IOException)`**: Called when a connection attempt fails. - **`connectStart(Call, InetSocketAddress, Proxy)`**: Called when a connection attempt begins. ``` -------------------------------- ### SystemPropsKt__SystemProps_commonKt Class Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Documentation for common system property access methods. ```APIDOC ## SystemPropsKt__SystemProps_commonKt Class Methods ### Description Offers common utility methods for retrieving various types of system properties, including integer, long, string, and boolean values, with default handling. ### Methods - `systemProp$default(String, Int, Int, Int, Object)`: Default method for retrieving an integer system property. - `systemProp$default(String, Long, Long, Long, Int, Object)`: Default method for retrieving a long system property. - `systemProp(String, Int, Int, Int)`: Retrieves an integer system property. - `systemProp(String, Long, Long, Long)`: Retrieves a long system property. - `systemProp(String, String)`: Retrieves a string system property. - `systemProp(String, Boolean)`: Retrieves a boolean system property. ### Endpoint N/A (Internal class methods) ``` -------------------------------- ### AppCompatDelegate Functionality Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Documentation for the AppCompatDelegate class, covering its static methods and instance methods for managing application-specific configurations and UI elements. ```APIDOC ## AppCompatDelegate Functionality ### Description This section covers the `AppCompatDelegate` and `AppCompatDelegateImpl` classes, detailing their roles in managing application-specific configurations, UI elements, and locale settings. ### Methods #### `androidx.appcompat.app.AppCompatDelegate.isAutoStorageOptedIn(android.content.Context)` - **Description**: Checks if auto storage is opted in for the application. - **Parameters**: - `context` (android.content.Context) - The application context. - **Returns**: `boolean` - True if auto storage is opted in, false otherwise. #### `androidx.appcompat.app.AppCompatDelegate.removeDelegateFromActives(androidx.appcompat.app.AppCompatDelegate)` - **Description**: Removes a delegate from the list of active delegates. - **Parameters**: - `delegate` (androidx.appcompat.app.AppCompatDelegate) - The delegate to remove. #### `androidx.appcompat.app.AppCompatDelegate.syncRequestedAndStoredLocales(android.content.Context)` - **Description**: Synchronizes requested and stored locales for the application. - **Parameters**: - `context` (android.content.Context) - The application context. #### `androidx.appcompat.app.AppCompatDelegateImpl.(android.content.Context, android.view.Window, androidx.appcompat.app.AppCompatCallback, java.lang.Object)` - **Description**: Constructor for `AppCompatDelegateImpl`. - **Parameters**: - `context` (android.content.Context) - The application context. - `window` (android.view.Window) - The window associated with the delegate. - `callback` (androidx.appcompat.app.AppCompatCallback) - The callback interface. - `object` (java.lang.Object) - An arbitrary object. #### `androidx.appcompat.app.AppCompatDelegateImpl.applyApplicationSpecificConfig(boolean, boolean)` - **Description**: Applies application-specific configuration settings. - **Parameters**: - `param1` (boolean) - First configuration flag. - `param2` (boolean) - Second configuration flag. - **Returns**: `boolean` - Result of the configuration application. #### `androidx.appcompat.app.AppCompatDelegateImpl.attachToWindow(android.view.Window)` - **Description**: Attaches the delegate to a window. - **Parameters**: - `window` (android.view.Window) - The window to attach to. #### `androidx.appcompat.app.AppCompatDelegateImpl.calculateApplicationLocales(android.content.Context)` - **Description**: Calculates the application's locales. - **Parameters**: - `context` (android.content.Context) - The application context. - **Returns**: `androidx.core.os.LocaleListCompat` - The calculated locale list. #### `androidx.appcompat.app.AppCompatDelegateImpl.createOverrideAppConfiguration(android.content.Context, int, androidx.core.os.LocaleListCompat, android.content.res.Configuration, boolean)` - **Description**: Creates an override application configuration. - **Parameters**: - `context` (android.content.Context) - The application context. - `param1` (int) - An integer parameter. - `localeList` (androidx.core.os.LocaleListCompat) - The locale list. - `configuration` (android.content.res.Configuration) - The base configuration. - `param2` (boolean) - A boolean parameter. - **Returns**: `android.content.res.Configuration` - The overridden configuration. #### `androidx.appcompat.app.AppCompatDelegateImpl.doInvalidatePanelMenu(int)` - **Description**: Invalidates a specific panel menu. - **Parameters**: - `panelType` (int) - The type of panel to invalidate. #### `androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor()` - **Description**: Ensures the sub-decor view is created and attached. #### `androidx.appcompat.app.AppCompatDelegateImpl.ensureWindow()` - **Description**: Ensures the window is properly initialized. #### `androidx.appcompat.app.AppCompatDelegateImpl.getPanelState(int)` - **Description**: Retrieves the state of a specific panel. - **Parameters**: - `panelType` (int) - The type of panel. - **Returns**: `androidx.appcompat.app.AppCompatDelegateImpl$PanelFeatureState` - The state of the panel. #### `androidx.appcompat.app.AppCompatDelegateImpl.initWindowDecorActionBar()` - **Description**: Initializes the window's decor action bar. #### `androidx.appcompat.app.AppCompatDelegateImpl.installViewFactory()` - **Description**: Installs the view factory for creating views. #### `androidx.appcompat.app.AppCompatDelegateImpl.mapNightMode(android.content.Context, int)` - **Description**: Maps a night mode value to an internal representation. - **Parameters**: - `context` (android.content.Context) - The application context. - `nightMode` (int) - The night mode value. - **Returns**: `int` - The mapped night mode value. #### `androidx.appcompat.app.AppCompatDelegateImpl.onCreate()` - **Description**: Handles the activity's create lifecycle event. #### `androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet)` - **Description**: Creates a view during the activity's layout inflation. - **Parameters**: - `parent` (android.view.View) - The parent view. - `name` (java.lang.String) - The name of the view to create. - `context` (android.content.Context) - The context. - `attrs` (android.util.AttributeSet) - The attributes for the view. - **Returns**: `android.view.View` - The created view. #### `androidx.appcompat.app.AppCompatDelegateImpl.onDestroy()` - **Description**: Handles the activity's destroy lifecycle event. #### `androidx.appcompat.app.AppCompatDelegateImpl.requestWindowFeature(int)` - **Description**: Requests a specific window feature. - **Parameters**: - `featureId` (int) - The ID of the feature to request. - **Returns**: `boolean` - True if the feature was successfully requested, false otherwise. ``` -------------------------------- ### ContextCompat API (Api21Impl, Api26Impl, Api28Impl) Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Utility methods for accessing resources and system services, with compatibility implementations for different API levels. ```APIDOC ## GET /context/drawable/{resourceId} ### Description Retrieves a drawable resource. ### Method GET ### Endpoint /context/drawable/{resourceId} ### Parameters #### Path Parameters - **resourceId** (int) - Required - The resource ID of the drawable. #### Request Body - **context** (android.content.Context) - Required - The application context. ### Response #### Success Response (200) - **drawable** (android.graphics.drawable.Drawable) - The drawable object. ## POST /context/registerReceiver ### Description Registers a broadcast receiver. ### Method POST ### Endpoint /context/registerReceiver ### Parameters #### Request Body - **context** (android.content.Context) - Required - The application context. - **receiver** (android.content.BroadcastReceiver) - Required - The broadcast receiver to register. - **filter** (android.content.IntentFilter) - Required - The intent filter for the receiver. - **broadcastPermission** (string) - Optional - Permission required to send broadcasts. - **handler** (android.os.Handler) - Optional - Handler for the receiver. - **flags** (int) - Optional - Flags for the receiver registration. ### Response #### Success Response (200) - **intent** (android.content.Intent) - The initial intent. ## GET /context/mainExecutor ### Description Gets the main application executor. ### Method GET ### Endpoint /context/mainExecutor ### Parameters #### Request Body - **context** (android.content.Context) - Required - The application context. ### Response #### Success Response (200) - **executor** (java.util.concurrent.Executor) - The main executor. ``` -------------------------------- ### NodeChainKt Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Static methods and initialization for NodeChainKt. ```APIDOC ## /androidx/compose/ui/node/NodeChainKt ### Description Class initializer for NodeChainKt. ### Method Class Initializer ### Endpoint /androidx/compose/ui/node/NodeChainKt ### Response #### Success Response (200) No specific response details provided. ``` ```APIDOC ## actionForModifiers /androidx/compose/ui/node/NodeChainKt ### Description Determines the action required for given modifier elements. ### Method Action For Modifiers ### Endpoint /androidx/compose/ui/node/NodeChainKt ### Parameters #### Path Parameters - **element1** (androidx.compose.ui.Modifier$Element) - Required - The first modifier element. - **element2** (androidx.compose.ui.Modifier$Element) - Required - The second modifier element. ### Response #### Success Response (200) - **actionCode** (int) - The action code representing the required action. ``` -------------------------------- ### AppCompatDelegateImpl.AppCompatWindowCallback Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Details methods for the AppCompatWindowCallback class within AppCompatDelegateImpl, including constructor and content changed callbacks. ```APIDOC ## POST /komikku-app/komikku/appcompat/delegate/appcompatwindowcallback/constructor ### Description Constructor for the AppCompatWindowCallback class. ### Method POST ### Endpoint /komikku-app/komikku/appcompat/delegate/appcompatwindowcallback/constructor ### Parameters #### Request Body - **delegate** (AppCompatDelegateImpl) - Required - The AppCompatDelegateImpl instance. - **callback** (Window.Callback) - Required - The window callback. ### Response #### Success Response (200) - **status** (string) - Indicates success. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## POST /komikku-app/komikku/appcompat/delegate/appcompatwindowcallback/bypassOnContentChanged ### Description Bypasses the onContentChanged method for AppCompatWindowCallback. ### Method POST ### Endpoint /komikku-app/komikku/appcompat/delegate/appcompatwindowcallback/bypassOnContentChanged ### Parameters #### Request Body - **callback** (Window.Callback) - Required - The window callback. ### Response #### Success Response (200) - **status** (string) - Indicates success. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## POST /komikku-app/komikku/appcompat/delegate/appcompatwindowcallback/onContentChanged ### Description Handles the onContentChanged event for AppCompatWindowCallback. ### Method POST ### Endpoint /komikku-app/komikku/appcompat/delegate/appcompatwindowcallback/onContentChanged ### Response #### Success Response (200) - **status** (string) - Indicates success. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### ConnectPlan Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Documentation for the ConnectPlan class, which outlines the steps for establishing a connection. ```APIDOC ## ConnectPlan ### Description Defines a plan for establishing a network connection, including TCP and TLS setup. ### Methods - `()` - `(okHttpClient: OkHttpClient, realCall: RealCall, realRoutePlanner: RealRoutePlanner, route: Route, list: List, i: Int, request: Request, i1: Int, z: Boolean)` - `cancel()` - `connectSocket()` - `connectTcp()` - `connectTls(sslSocket: SSLSocket, connectionSpec: ConnectionSpec)` - `connectTlsEtc()` - `copy$default(connectPlan: ConnectPlan, i: Int, request: Request, i1: Int, z: Boolean, i2: Int)` - `handleSuccess()` - `isReady()` - `nextConnectionSpec$okhttp(list: List, sslSocket: SSLSocket)` - `planWithCurrentOrInitialConnectionSpec$okhttp(list: List, sslSocket: SSLSocket)` - `retry()` ``` -------------------------------- ### WindowInsetsCompat Impl30 Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Details the constructor and methods for WindowInsetsCompat Impl30, which handles window insets for API level 30. ```APIDOC ## WindowInsetsCompat Impl30 ### Description Implementation for API level 30. ### Methods #### Constructor - `WindowInsetsCompat$Impl30(WindowInsetsCompat, WindowInsets)`: Initializes the Impl30 object. #### `copyRootViewBounds(View view)` - Parameters: - `view` (View): The view whose root bounds should be copied. #### `getInsets(int type)` - Parameters: - `type` (int): The type of insets to retrieve. - Returns: `Insets` - The insets for the specified type. #### `getInsetsIgnoringVisibility(int type)` - Parameters: - `type` (int): The type of insets to retrieve. - Returns: `Insets` - The insets for the specified type, ignoring visibility. #### `isVisible(int type)` - Parameters: - `type` (int): The type of insets to check. - Returns: `boolean` - True if the insets for the specified type are visible, false otherwise. ``` -------------------------------- ### CoreComponentFactory Instantiation Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Methods for instantiating ContentProviders and BroadcastReceivers using the CoreComponentFactory. ```APIDOC ## CoreComponentFactory Instantiation ### Description Provides methods to instantiate Android components like ContentProviders and BroadcastReceivers. ### Method - `instantiateProvider(ClassLoader, String)` - `instantiateReceiver(ClassLoader, String, Intent)` ### Endpoint N/A (Class methods) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - `ContentProvider` or `BroadcastReceiver` instance #### Response Example None ``` -------------------------------- ### SystemPropsKt__SystemPropsKt Class Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Documentation for methods in SystemPropsKt__SystemPropsKt for accessing system properties. ```APIDOC ## SystemPropsKt__SystemPropsKt Class Methods ### Description Provides methods for accessing system properties, including a general string property retrieval. ### Methods - `()`: Class initializer. - `systemProp(String)`: Retrieves a system property as a string. ### Endpoint N/A (Internal class methods) ``` -------------------------------- ### RouteSelector Initialization Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Details the static initialization of the RouteSelector class. ```APIDOC ## RouteSelector Initialization ### Description Handles the static initialization block for the RouteSelector class. ### Methods - **** () - Static initializer for RouteSelector. ``` -------------------------------- ### WindowInsetsCompat Impl29 Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Details the constructor for WindowInsetsCompat Impl29, which handles window insets for API level 29. ```APIDOC ## WindowInsetsCompat Impl29 ### Description Implementation for API level 29. ### Methods #### Constructor - `WindowInsetsCompat$Impl29(WindowInsetsCompat, WindowInsets)`: Initializes the Impl29 object. ``` -------------------------------- ### Create Backup with BackupCreator Source: https://context7.com/komikku-app/komikku/llms.txt Use the BackupCreator class to programmatically create backup files. Specify backup options and a target URI. Handles exceptions during the backup process. ```kotlin class BackupCreator( private val context: Context, private val isAutoBackup: Boolean ) { // Create backup file at specified URI suspend fun backup(uri: Uri, options: BackupOptions): String // Backup individual components suspend fun backupCategories(options: BackupOptions): List suspend fun backupMangas(mangas: List, options: BackupOptions): List fun backupSources(mangas: List): List suspend fun backupAppPreferences(options: BackupOptions): List suspend fun backupExtensionRepos(options: BackupOptions): List fun backupSourcePreferences(options: BackupOptions): List suspend fun backupSavedSearches(options: BackupOptions): List suspend fun backupFeeds(options: BackupOptions): List } // BackupOptions data class data class BackupOptions( val libraryEntries: Boolean = true, val categories: Boolean = true, val chapters: Boolean = true, val tracking: Boolean = true, val history: Boolean = true, val appSettings: Boolean = true, val sourceSettings: Boolean = true, val privateSettings: Boolean = false, val extensionRepoSettings: Boolean = true, val savedSearchesFeeds: Boolean = true, val readEntries: Boolean = false ) // Example: Creating a backup programmatically val backupCreator = BackupCreator(context, isAutoBackup = false) val options = BackupOptions( libraryEntries = true, categories = true, chapters = true, tracking = true, history = true, appSettings = true, sourceSettings = true, privateSettings = false ) try { val backupUri = backupCreator.backup(targetUri, options) Log.d("Backup", "Backup created at: $backupUri") } catch (e: Exception) { Log.e("Backup", "Backup failed: ${e.message}") } // Backup file naming convention // Format: app.komikku_YYYY-MM-DD_HH-mm.tachibk val filename = BackupCreator.getFilename() // Example output: "app.komikku_2024-01-15_14-30.tachibk" ``` -------------------------------- ### SystemPropsKt Class Methods Source: https://github.com/komikku-app/komikku/blob/master/app/src/main/baseline-prof.txt Documentation for methods in SystemPropsKt for accessing system properties. ```APIDOC ## SystemPropsKt Class Methods ### Description Provides utility methods for accessing various system properties, including available processors and specific system configurations. ### Methods - `getAVAILABLE_PROCESSORS()`: Retrieves the number of available processors. - `systemProp$default(String, Int, Int, Int, Object)`: A default method for retrieving an integer system property with default values. - `systemProp$default(String, Long, Long, Long, Int, Object)`: A default method for retrieving a long system property with default values. - `systemProp(String, Int, Int, Int)`: Retrieves an integer system property. - `systemProp(String, String)`: Retrieves a string system property. - `systemProp(String, Boolean)`: Retrieves a boolean system property. ### Endpoint N/A (Internal class methods) ```