NetworkStateRepo
class NetworkStateRepo(networkManagerBuilder: NetworkManager.Builder, coroutineContext: CoroutineContext) : NetworkStateImplRepo
A NetworkStateImplRepo using a NetworkManager
Parameters
networkManagerBuilder
the NetworkManager.Builder for building a NetworkManager
coroutineContext
the CoroutineContext the CoroutineContext used to create a coroutine scope for this state machine
Properties
Link copied to clipboard
Link copied to clipboard
val deinitChangeStateWithRepo: suspend (NetworkState, ColdStateFlowRepo<NetworkState>) -> suspend () -> NetworkState?
Link copied to clipboard
Link copied to clipboard
val initChangeStateWithRepo: suspend (NetworkState, ColdStateFlowRepo<NetworkState>) -> suspend () -> NetworkState
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun launchTakeAndChangeState(context: CoroutineContext, action: suspend (NetworkState) -> suspend () -> NetworkState): Job
fun <K : NetworkState> launchTakeAndChangeState(context: CoroutineContext, remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> NetworkState): Job
Link copied to clipboard
fun <Result> launchUseState(context: CoroutineContext, action: suspend (NetworkState) -> Result): Job
Link copied to clipboard
Transforms a Flow of NetworkState into a flow of its associated NetworkConnectionType
Link copied to clipboard
Link copied to clipboard
Transforms a Flow of NetworkState into a flow indicating the network is considered to be available.
Link copied to clipboard
Link copied to clipboard
suspend fun takeAndChangeState(action: suspend (NetworkState) -> suspend () -> NetworkState): NetworkState
suspend fun <K : NetworkState> takeAndChangeState(remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> NetworkState): NetworkState