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>

Be aware, that most StateFlows you got before will not be updated after calling this method.

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()
Link copied to clipboard
abstract suspend fun stopSync(wait: Boolean = false)
Link copied to clipboard
abstract suspend fun syncOnce(timeout: Long = 0): Result<Unit>
abstract suspend fun <T> syncOnce(timeout: Long = 0, runOnce: suspend (Sync.Response) -> T): Result<T>