NetworkStateImplRepo
open class NetworkStateImplRepo(createNetworkManager: suspend () -> NetworkManager, coroutineContext: CoroutineContext) : BaseNetworkStateRepo
A BaseNetworkStateRepo managed using a NetworkManager
Parameters
createNetworkManager
method for creating the NetworkManager to manage the NetworkState
coroutineContext
the CoroutineContext the CoroutineContext used to create a coroutine scope for this state machine.
Inheritors
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