package com.adealink.weparty.config

import com.adealink.frame.mvvm.livedata.OnceMutableLiveData

interface IGlobalConfigManager {
    fun getAllGlobalConfig(forceNet: Boolean = false)
    fun getGlobalConfig(forceNet: Boolean = false, configType: GlobalConfigType): OnceMutableLiveData<List<String>?>
    suspend fun suspendGetConfig(configType: GlobalConfigType): List<String>?
    fun getConfig(configType: GlobalConfigType): List<String>?
    suspend fun <T> suspendGetConfig(configType: GlobalConfigType, clazz: Class<T>): T?
    suspend fun <T> suspendGetConfigList(configType: GlobalConfigType, clazz: Class<T>): List<T>
    fun addListener(configType: GlobalConfigType, l: IGlobalConfigListener)
    fun removeListener(configType: GlobalConfigType, l: IGlobalConfigListener)
    fun logout()
}