MatrixClient

interface MatrixClient

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class LoginInfo(val userId: UserId, val deviceId: String, val accessToken: String, val displayName: String?, val avatarUrl: String?)
Link copied to clipboard
Link copied to clipboard
data class SoftLoginInfo(val identifier: IdentifierType, val password: String? = null, val token: String? = null, val loginType: LoginType = LoginType.Password)

Properties

Link copied to clipboard
abstract val api: MatrixClientServerApiClient

Use this for further access to matrix client-server-API.

Link copied to clipboard
abstract val avatarUrl: StateFlow<String?>
Link copied to clipboard
abstract val deviceId: String
Link copied to clipboard
abstract val di: Koin
Link copied to clipboard
abstract val displayName: StateFlow<String?>
Link copied to clipboard
abstract val identityKey: Key.Curve25519Key
Link copied to clipboard
abstract val initialSyncDone: StateFlow<Boolean>
Link copied to clipboard
Link copied to clipboard
abstract val loginState: StateFlow<MatrixClient.LoginState?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val signingKey: Key.Ed25519Key
Link copied to clipboard
abstract val syncState: StateFlow<SyncState>
Link copied to clipboard
Link copied to clipboard
abstract val userId: UserId

Functions

Link copied to clipboard
abstract suspend fun cancelSync(wait: Boolean = false)
Link copied to clipboard
abstract suspend fun clearCache(): Result<Unit>
Link copied to clipboard
abstract suspend fun clearMediaCache(): Result<Unit>
Link copied to clipboard
abstract suspend fun logout(): Result<Unit>
Link copied to clipboard
abstract suspend fun setAvatarUrl(avatarUrl: String?): Result<Unit>
Link copied to clipboard
abstract suspend fun setDisplayName(displayName: String?): Result<Unit>
Link copied to clipboard
abstract suspend fun startSync(presence: Presence? = Presence.ONLINE)
Link copied to clipboard
abstract fun stop()

Stop the MatrixClient and its CoroutineScope. It should be called to clean up all resources used by MatrixClient.

Link copied to clipboard
abstract suspend fun stopSync(wait: Boolean = false)
Link copied to clipboard
abstract suspend fun syncOnce(presence: Presence? = Presence.OFFLINE, timeout: Long = 0): Result<Unit>
abstract suspend fun <T> syncOnce(presence: Presence? = Presence.OFFLINE, timeout: Long = 0, runOnce: suspend (Sync.Response) -> T): Result<T>