Package-level declarations

Types

Link copied to clipboard
open class EquinoxLocalUser(localStoragePath: String)

The EquinoxLocalUser class is useful to represent a user in the client application

Link copied to clipboard
data class FallbackUiDefaults(val textStyle: TextStyle, val containerColor: Color, val contentColor: Color)

The FallbackUiDefaults allows to customize the fallback pages (ServerOfflineUi and NoInternetConnectionUi) style

Link copied to clipboard
class Retriever(val retrieverScope: CoroutineScope)

The Retriever handles that repetitive retrieving routines and execute them in background by the retrieverScope

Link copied to clipboard
data class SessionSetup(    val serverOfflineMessage: StringResource,     val serverOfflineIcon: ImageVector,     val noInternetConnectionMessage: StringResource,     val noInternetConnectionIcon: ImageVector,     val hasBeenDisconnectedAction: () -> Unit)

The SessionSetup class is useful to create a setup for the current session

Link copied to clipboard

List of the possible statuses of the session

Properties

Link copied to clipboard

hasBeenDisconnectedAction when the account has been deleted and the session needs to be detached from the device

Link copied to clipboard
private lateinit var isServerOffline: MutableState<Boolean>

isServerOffline state to manage the server offline scenario

Link copied to clipboard

noInternetConnection state to manage the no internet connection scenario

Link copied to clipboard
private const val POLLING_URL: String

POLLING_URL the url to use for the polling operations

Link copied to clipboard
private lateinit var sessionSetup: SessionSetup

sessionSetup the setup for the session

Link copied to clipboard

sessionStatus the current session status

Functions

Link copied to clipboard
actual fun createConnectivity(): Connectivity

Method used to create a monitor connectivity instance specific for each platform. It is useful to monitor the connection status and adapt the content by the com.tecknobit.equinoxcompose.helpers.session.ManagedContent component

expect fun createConnectivity(): Connectivity

Method used to create a monitor connectivity instance specific for each platform. It is useful to monitor the connection status and adapt the content by the com.tecknobit.equinoxcompose.helpers.session.ManagedContent component

actual fun createConnectivity(): Connectivity

Method used to create a monitor connectivity instance specific for each platform. It is useful to monitor the connection status and adapt the content by the com.tecknobit.equinoxcompose.helpers.session.ManagedContent component

actual fun createConnectivity(): Connectivity

Method used to create a monitor connectivity instance specific for each platform. It is useful to monitor the connection status and adapt the content by the com.tecknobit.equinoxcompose.helpers.session.ManagedContent component

actual fun createConnectivity(): Connectivity

Method used to create a monitor connectivity instance specific for each platform. It is useful to monitor the connection status and adapt the content by the com.tecknobit.equinoxcompose.helpers.session.ManagedContent component

Link copied to clipboard
fun createFallbackUiAppearance(    textStyle: TextStyle = TextStyle.Default,     containerColor: Color = MaterialTheme.colorScheme.background,     contentColor: Color = MaterialTheme.colorScheme.error): FallbackUiDefaults

Method used to create a customization style for a fallback page

Link copied to clipboard

Method used to get the current status of the session as SessionStatus

Link copied to clipboard

Method used to disconnect the current user from the session

Link copied to clipboard

Method used to instantiate the session instances to manage the different scenarios

Link copied to clipboard
fun ManagedContent(    content: @Composable () -> Unit,     viewModel: EquinoxViewModel,     loadingRoutine: suspend () -> Boolean? = null,     initialDelay: Long? = null,     serverOfflineUiDefaults: FallbackUiDefaults = createFallbackUiAppearance(),     serverOfflineRetryText: StringResource? = null,     serverOfflineRetryAction: @Composable () -> Unit? = null,     noInternetConnectionUiDefaults: FallbackUiDefaults = createFallbackUiAppearance(),     noInternetConnectionRetryText: StringResource? = null,     noInternetConnectionRetryAction: @Composable () -> Unit? = null)

Method used to display the correct content based on the current scenario such server offline or device disconnected or no internet connection available

Link copied to clipboard
private fun NoInternetConnectionUi(    viewModel: EquinoxViewModel,     uiDefaults: FallbackUiDefaults,     retryText: StringResource?,     retryAction: @Composable () -> Unit?)

Method used to display the content when the internet connection missing

Link copied to clipboard
private fun ServerOfflineUi(uiDefaults: FallbackUiDefaults, retryText: StringResource?, retryAction: @Composable () -> Unit?)

Method used to display the content when the server is offline

Link copied to clipboard
fun setHasBeenDisconnectedValue(hasBeenDisconnectedValue: Boolean)

Method used to set the value of the hasBeenDisconnectedAction state, when the value is true will be invoked the hasBeenDisconnectedAction method, when false will be displayed the normal content

Link copied to clipboard
fun setServerOfflineValue(isServerOfflineValue: Boolean)

Method used to set the value of the isServerOffline state, when the value is true will be invoked the ServerOfflineUi method, when false will be displayed the normal content

Link copied to clipboard
fun setUpSession(sessionSetupValue: SessionSetup)
fun setUpSession(    serverOfflineMessage: StringResource = Res.string.server_currently_offline,     serverOfflineIcon: ImageVector = Icons.Default.Warning,     noInternetConnectionMessage: StringResource = Res.string.no_internet_connection,     noInternetConnectionIcon: ImageVector = vectorResource(Res.drawable.no_internet),     hasBeenDisconnectedAction: () -> Unit)

Method used to set up the sessionSetup instance