Compare commits

..

1 commit

Author SHA1 Message Date
038d924a99
feat: discovery 2025-03-10 09:55:19 +08:00

View file

@ -2,15 +2,14 @@ package net.typeblog.lpac_jni
interface ProfileDownloadCallback {
companion object {
fun lookupStateFromProgress(progress: Int): DownloadState =
when (progress) {
0 -> DownloadState.Preparing
20 -> DownloadState.Connecting
40 -> DownloadState.Authenticating
60 -> DownloadState.Downloading
80 -> DownloadState.Finalizing
else -> throw IllegalArgumentException("Unknown state")
}
fun lookupStateFromProgress(progress: Int): DownloadState = when (progress) {
0 -> DownloadState.Preparing
20 -> DownloadState.Connecting
40 -> DownloadState.Authenticating
60 -> DownloadState.Downloading
80 -> DownloadState.Finalizing
else -> throw IllegalArgumentException("Unknown state")
}
}
enum class DownloadState(val progress: Int) {