CoreLogic

actual class CoreLogic : CoreLogicCommon

This class is only for platform specific variables, and it should only override functions/variables from CoreLogicCommon

actual class CoreLogic : CoreLogicCommon
expect class CoreLogic : CoreLogicCommon
actual class CoreLogic : CoreLogicCommon

Samples

samples.logic.CoreLogicSamples.versionedAuthScope

Constructors

Link copied to clipboard
constructor(userAgent: String, appContext: Context, rootPath: String, kaliumConfigs: KaliumConfigs, userAuthenticatedNetworkProvider: UserAuthenticatedNetworkProvider = PlatformUserAuthenticatedNetworkProvider())
constructor(rootPath: String, keychainConfig: ApplePersistenceConfig, kaliumConfigs: KaliumConfigs, userAgent: String, useInMemoryStorage: Boolean = false, userAuthenticatedNetworkProvider: UserAuthenticatedNetworkProvider = PlatformUserAuthenticatedNetworkProvider())
constructor(rootPath: String, kaliumConfigs: KaliumConfigs, userAgent: String, useInMemoryStorage: Boolean = false, userAuthenticatedNetworkProvider: UserAuthenticatedNetworkProvider = PlatformUserAuthenticatedNetworkProvider())

Properties

Link copied to clipboard
internal actual open override val globalCallManager: GlobalCallManager
internal actual open override val globalCallManager: GlobalCallManager
internal expect open override val globalCallManager: GlobalCallManager
internal actual open override val globalCallManager: GlobalCallManager
Link copied to clipboard
actual open override val networkStateObserver: NetworkStateObserver
actual open override val networkStateObserver: NetworkStateObserver
expect open override val networkStateObserver: NetworkStateObserver
actual open override val networkStateObserver: NetworkStateObserver
Link copied to clipboard
Link copied to clipboard
internal actual open override val userSessionScopeProvider: Lazy<UserSessionScopeProvider>
internal actual open override val userSessionScopeProvider: Lazy<UserSessionScopeProvider>
internal expect open override val userSessionScopeProvider: Lazy<UserSessionScopeProvider>
internal actual open override val userSessionScopeProvider: Lazy<UserSessionScopeProvider>
Link copied to clipboard
internal val userStorageProvider: UserStorageProvider
internal val userStorageProvider: UserStorageProvider
internal val userStorageProvider: UserStorageProvider
internal val userStorageProvider: UserStorageProvider
Link copied to clipboard
internal actual open override val workSchedulerProvider: WorkSchedulerProvider
internal actual open override val workSchedulerProvider: WorkSchedulerProvider
internal expect open override val workSchedulerProvider: WorkSchedulerProvider
internal actual open override val workSchedulerProvider: WorkSchedulerProvider

Functions

Link copied to clipboard
internal inline fun <T> authenticationScope(serverConfig: ServerConfig, proxyCredentials: ProxyCredentials?, action: AuthenticationScope.() -> T): T
internal inline fun <T> authenticationScope(serverConfig: ServerConfig, proxyCredentials: ProxyCredentials?, action: AuthenticationScope.() -> T): T
internal inline fun <T> authenticationScope(serverConfig: ServerConfig, proxyCredentials: ProxyCredentials?, action: AuthenticationScope.() -> T): T
internal inline fun <T> authenticationScope(serverConfig: ServerConfig, proxyCredentials: ProxyCredentials?, action: AuthenticationScope.() -> T): T
Link copied to clipboard
internal actual open suspend override fun deleteSessionScope(userId: UserId)
internal actual open suspend override fun deleteSessionScope(userId: UserId)
internal expect open suspend override fun deleteSessionScope(userId: UserId)
internal actual open suspend override fun deleteSessionScope(userId: UserId)
Link copied to clipboard
internal fun getAuthenticationScope(serverConfig: ServerConfig, proxyCredentials: ProxyCredentials?): AuthenticationScope
internal fun getAuthenticationScope(serverConfig: ServerConfig, proxyCredentials: ProxyCredentials?): AuthenticationScope
internal fun getAuthenticationScope(serverConfig: ServerConfig, proxyCredentials: ProxyCredentials?): AuthenticationScope
internal fun getAuthenticationScope(serverConfig: ServerConfig, proxyCredentials: ProxyCredentials?): AuthenticationScope
Link copied to clipboard
actual open override fun getSessionScope(userId: UserId): UserSessionScope
actual open override fun getSessionScope(userId: UserId): UserSessionScope
expect open override fun getSessionScope(userId: UserId): UserSessionScope
actual open override fun getSessionScope(userId: UserId): UserSessionScope
Link copied to clipboard
inline fun <T> globalScope(action: GlobalKaliumScope.() -> T): T
inline fun <T> globalScope(action: GlobalKaliumScope.() -> T): T
inline fun <T> globalScope(action: GlobalKaliumScope.() -> T): T
inline fun <T> globalScope(action: GlobalKaliumScope.() -> T): T
Link copied to clipboard

Opens the account, waiting cancellably for Apple app/extension ownership. On Apple, call this before using the synchronous cached getSessionScope.

Opens the account, waiting cancellably for Apple app/extension ownership. On Apple, call this before using the synchronous cached getSessionScope.

Opens the account, waiting cancellably for Apple app/extension ownership. On Apple, call this before using the synchronous cached getSessionScope.

Opens the account, waiting cancellably for Apple app/extension ownership. On Apple, call this before using the synchronous cached getSessionScope.

Link copied to clipboard
suspend fun prepareSessionForNotifications(userId: UserId, scope: UserSessionScope): Either<CoreFailure, Unit>

Revalidate an owned, synced session for notification receiving after app restoration.

Link copied to clipboard

Registers a logger configuration for Kalium. This can be called after CoreLogic initialization to enable logging. Can be called multiple times to update the logger configuration.

Registers a logger configuration for Kalium. This can be called after CoreLogic initialization to enable logging. Can be called multiple times to update the logger configuration.

Registers a logger configuration for Kalium. This can be called after CoreLogic initialization to enable logging. Can be called multiple times to update the logger configuration.

Registers a logger configuration for Kalium. This can be called after CoreLogic initialization to enable logging. Can be called multiple times to update the logger configuration.

Link copied to clipboard
suspend fun releaseSessionScope(userId: UserId)

Fully close an account after the host has cancelled and joined its users and collectors. Failure keeps the account unavailable until process exit.

Link copied to clipboard

Resume a background-paused account before foreground work or a system-authorized background operation. Ordinary openSessionScope calls wait while paused and cannot reacquire the shared file lock.

Link copied to clipboard

Resume retained accounts before restarting foreground observers that may request them.

Link copied to clipboard
inline fun <T> sessionScope(userId: UserId, action: UserSessionScope.() -> T): T
inline fun <T> sessionScope(userId: UserId, action: UserSessionScope.() -> T): T
inline fun <T> sessionScope(userId: UserId, action: UserSessionScope.() -> T): T
inline fun <T> sessionScope(userId: UserId, action: UserSessionScope.() -> T): T
Link copied to clipboard
suspend fun stopSyncForRestart()

Permanently stops sync for all accounts and waits for current event processing before restarting the app.

suspend fun stopSyncForRestart()

Permanently stops sync for all accounts and waits for current event processing before restarting the app.

suspend fun stopSyncForRestart()

Permanently stops sync for all accounts and waits for current event processing before restarting the app.

suspend fun stopSyncForRestart()

Permanently stops sync for all accounts and waits for current event processing before restarting the app.

Link copied to clipboard
suspend fun suspendSessionScope(userId: UserId)

Pause account database access and native crypto while retaining the session. The host must stop foreground sync and exclude accounts with active calls first. Call resumeSessionScope or resumeSuspendedSessionScopes when execution is authorized again.