Package-level declarations

Types

Link copied to clipboard
annotation class Auth(val required: AuthRequired)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
sealed interface ErrorResponse
Link copied to clipboard
interface EventHandler
Link copied to clipboard
annotation class HttpMethod(val type: HttpMethodType)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class MatrixServerException(val statusCode: HttpStatusCode, val errorResponse: ErrorResponse, val retryAfter: Long? = null) : Exception
Link copied to clipboard
typealias Subscriber<T> = suspend (T) -> Unit
Link copied to clipboard
typealias Unsubscriber = () -> Unit
Link copied to clipboard
data class UserInfo(val userId: UserId, val deviceId: String, val signingPublicKey: Key.Ed25519Key, val identityPublicKey: Key.Curve25519Key)

Functions

Link copied to clipboard
fun Json.decodeErrorResponse(body: JsonObject): ErrorResponse
Link copied to clipboard
fun <C : EventContent, E : ClientEvent<out C>> Flow<E>.filterContent(contentClass: KClass<out C>, eventClass: KClass<out E>? = null): Flow<E>
Link copied to clipboard
fun ClientEventEmitter<*>.subscribe(priority: Int = Priority.DEFAULT, subscriber: suspend () -> Unit): Unsubscriber

Subscribers have to be aware to unsubscribe when the scope of the subscriber is destroyed.

Link copied to clipboard
fun <T : List<ClientEvent<*>>> ClientEventEmitter<T>.subscribeAsFlow(priority: Int = Priority.DEFAULT): Flow<T>

Subscribe with a flow.

Link copied to clipboard
fun ClientEventEmitter<*>.subscribeChangeAsFlow(priority: Int = Priority.DEFAULT): Flow<Unit>

Subscribe with a flow.

Link copied to clipboard
inline fun <C : EventContent> ClientEventEmitter<*>.subscribeContent(priority: Int = Priority.DEFAULT, noinline subscriber: Subscriber<ClientEvent<C>>): Unsubscriber
fun <C : EventContent> ClientEventEmitter<*>.subscribeContent(contentClass: KClass<C>, priority: Int, subscriber: Subscriber<ClientEvent<C>>): Unsubscriber

Subscribers have to be aware to unsubscribe when the scope of the subscriber is destroyed.

Link copied to clipboard
inline fun <C : EventContent> ClientEventEmitter<*>.subscribeContentAsFlow(priority: Int = Priority.DEFAULT): Flow<ClientEvent<C>>

Subscribe events with a flow.

Link copied to clipboard
inline fun <C : EventContent> ClientEventEmitter<*>.subscribeContentList(priority: Int = Priority.DEFAULT, noinline subscriber: Subscriber<List<ClientEvent<C>>>): Unsubscriber
fun <C : EventContent> ClientEventEmitter<*>.subscribeContentList(contentClass: KClass<C>, priority: Int, subscriber: Subscriber<List<ClientEvent<C>>>): Unsubscriber

Subscribers have to be aware to unsubscribe when the scope of the subscriber is destroyed.

Link copied to clipboard
inline fun <C : EventContent> ClientEventEmitter<*>.subscribeContentListAsFlow(priority: Int = Priority.DEFAULT): Flow<List<ClientEvent<C>>>

Subscribe events with a flow.

Link copied to clipboard
fun ClientEventEmitter<*>.subscribeEachEvent(priority: Int = Priority.DEFAULT, subscriber: Subscriber<ClientEvent<*>>): Unsubscriber

Subscribers have to be aware to unsubscribe when the scope of the subscriber is destroyed.

Link copied to clipboard
fun ClientEventEmitter<*>.subscribeEachEventAsFlow(priority: Int = Priority.DEFAULT): Flow<ClientEvent<*>>

Subscribe events with a flow.

Link copied to clipboard
inline fun <C : EventContent, E : ClientEvent<C>> ClientEventEmitter<*>.subscribeEvent(priority: Int = Priority.DEFAULT, noinline subscriber: Subscriber<E>): Unsubscriber
fun <C : EventContent, E : ClientEvent<C>> ClientEventEmitter<*>.subscribeEvent(contentClass: KClass<C>, eventClass: KClass<E>, priority: Int, subscriber: Subscriber<E>): Unsubscriber

Subscribers have to be aware to unsubscribe when the scope of the subscriber is destroyed.

Link copied to clipboard
inline fun <C : EventContent, E : ClientEvent<C>> ClientEventEmitter<*>.subscribeEventAsFlow(priority: Int = Priority.DEFAULT): Flow<E>

Subscribe events with a flow.

Link copied to clipboard
inline fun <C : EventContent, E : ClientEvent<C>> ClientEventEmitter<*>.subscribeEventList(priority: Int = Priority.DEFAULT, noinline subscriber: Subscriber<List<E>>): Unsubscriber
fun <C : EventContent, E : ClientEvent<C>> ClientEventEmitter<*>.subscribeEventList(contentClass: KClass<C>, eventClass: KClass<E>, priority: Int, subscriber: Subscriber<List<E>>): Unsubscriber

Subscribers have to be aware to unsubscribe when the scope of the subscriber is destroyed.

Link copied to clipboard
inline fun <C : EventContent, E : ClientEvent<C>> ClientEventEmitter<*>.subscribeEventListAsFlow(priority: Int = Priority.DEFAULT): Flow<List<E>>

Subscribe events with a flow.

Link copied to clipboard
fun Unsubscriber.unsubscribeOnCompletion(coroutineScope: CoroutineScope): DisposableHandle