Connect Screen View Model

class ConnectScreenViewModel : EquinoxViewModel

The ConnectScreenViewModel class is the support class used to connect to an existing session or to create a new one

Author

N7ghtm4r3 - Tecknobit

See also

Retriever
EquinoxViewModel

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

connecting whether the user attempting to connect to an existing session

Link copied to clipboard
lateinit var host: MutableState<String>

host the value of the host to reach

Link copied to clipboard

hostError whether the host field is not valid

Link copied to clipboard
lateinit var joinCode: MutableState<String>

joinCode the value of the join code

Link copied to clipboard

joinCodeError whether the joinCode field is not valid

Link copied to clipboard
lateinit var password: MutableState<String>

password the value of the password

Link copied to clipboard

passwordError whether the password field is not valid

Link copied to clipboard

serverSecret the value of the server secret

Link copied to clipboard

serverSecretError whether the serverSecret field is not valid

Link copied to clipboard

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
open override fun canRetrieverStart(): Boolean
Link copied to clipboard
fun connect()

Method used to connect or create a new session

Link copied to clipboard
open override fun continueToRetrieve(currentContext: KClass<*>): Boolean
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
open override fun restartRetriever()
Link copied to clipboard
open fun restartRetrieverIf(condition: Boolean)
Link copied to clipboard
open override fun retrieve(currentContext: KClass<*>, routine: suspend () -> Unit, repeatRoutine: Boolean, refreshDelay: Long)
Link copied to clipboard
open fun setActiveContext(currentContext: KClass<*>)
Link copied to clipboard
fun showSnackbarMessage(message: String, actionLabel: String?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
fun showSnackbarMessage(response: JsonObject, actionLabel: String?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
fun showSnackbarMessage(message: StringResource, actionLabel: StringResource?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
Link copied to clipboard
open override fun suspendRetriever()
Link copied to clipboard
open fun suspendRetrieverIf(condition: Boolean)