MatrixClient

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class LoginInfo(val userId: UserId, val deviceId: String, val accessToken: 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 baseUrl: Url
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 serverData: StateFlow<ServerData?>
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
expect abstract fun close()
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 suspend fun stopSync(wait: Boolean = false)
Link copied to clipboard
abstract suspend fun syncOnce(presence: Presence? = Presence.OFFLINE, timeout: Duration = Duration.ZERO): Result<Unit>
abstract suspend fun <T> syncOnce(presence: Presence? = Presence.OFFLINE, timeout: Duration = Duration.ZERO, runOnce: suspend (Sync.Response) -> T): Result<T>

Usually used for background sync.