forked from home-assistant/android
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSettingsPresenter.kt
More file actions
30 lines (27 loc) · 1.25 KB
/
SettingsPresenter.kt
File metadata and controls
30 lines (27 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package io.homeassistant.companion.android.settings
import android.content.Context
import androidx.preference.PreferenceDataStore
import io.homeassistant.companion.android.common.data.integration.impl.entities.RateLimitResponse
import io.homeassistant.companion.android.database.server.Server
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.StateFlow
interface SettingsPresenter {
companion object {
const val SUGGESTION_ASSISTANT_APP = "assistant_app"
const val SUGGESTION_NOTIFICATION_PERMISSION = "notification_permission"
}
fun init(view: SettingsView)
fun getPreferenceDataStore(): PreferenceDataStore
fun onFinish()
fun updateSuggestions(context: Context)
fun cancelSuggestion(context: Context, id: String)
fun getSuggestionFlow(): StateFlow<SettingsHomeSuggestion?>
suspend fun getServersFlow(): Flow<List<Server>>
suspend fun getNotificationRateLimits(): RateLimitResponse?
fun getAvailablePushProviders(): List<Pair<String, String>>
fun getActivePushProviderValue(): String
fun handlePushProviderChange(value: String?)
suspend fun showChangeLog(context: Context)
suspend fun isChangeLogPopupEnabled(): Boolean
suspend fun setChangeLogPopupEnabled(enabled: Boolean)
}