Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
fun interface ForgetRoomService
Link copied to clipboard
class ForgetRoomServiceImpl(roomStore: RoomStore, roomUserStore: RoomUserStore, roomStateStore: RoomStateStore, roomAccountDataStore: RoomAccountDataStore, roomTimelineStore: RoomTimelineStore, roomOutboxMessageStore: RoomOutboxMessageStore, notificationStore: NotificationStore) : ForgetRoomService
Link copied to clipboard
data class GetTimelineEventConfig(var decryptionTimeout: Duration = INFINITE, var fetchTimeout: Duration = INFINITE, var fetchSize: Long = 20, var allowReplaceContent: Boolean = true)
Link copied to clipboard
data class GetTimelineEventsConfig(var decryptionTimeout: Duration = INFINITE, var fetchTimeout: Duration = INFINITE, var fetchSize: Long = 20, var allowReplaceContent: Boolean = true, var minSize: Long? = null, var maxSize: Long? = null)
Link copied to clipboard
class MegolmRoomEventEncryptionService(roomStore: RoomStore, loadMembersService: LoadMembersService, roomStateStore: RoomStateStore, olmCryptoStore: OlmCryptoStore, keyBackupService: KeyBackupService, outgoingRoomKeyRequestEventHandler: OutgoingRoomKeyRequestEventHandler, olmEncryptionService: OlmEncryptionService) : RoomEventEncryptionService
Link copied to clipboard
class OutboxMessageEventHandler(config: MatrixClientConfiguration, api: MatrixClientServerApiClient, roomStore: RoomStore, roomEventEncryptionServices: List<RoomEventEncryptionService>, userService: UserService, mediaService: MediaService, roomOutboxMessageStore: RoomOutboxMessageStore, outboxMessageMediaUploaderMappings: OutboxMessageMediaUploaderMappings, currentSyncState: CurrentSyncState, userInfo: UserInfo, tm: TransactionManager, clock: Clock) : EventHandler
Link copied to clipboard
Link copied to clipboard
class RoomListHandler(api: MatrixClientServerApiClient, roomStore: RoomStore, roomStateStore: RoomStateStore, globalAccountDataStore: GlobalAccountDataStore, roomAccountDataStore: RoomAccountDataStore, forgetRoomService: ForgetRoomService, roomService: RoomService, userInfo: UserInfo, tm: TransactionManager, config: MatrixClientConfiguration) : EventHandler
Link copied to clipboard
interface RoomService
Link copied to clipboard
class RoomServiceImpl(api: MatrixClientServerApiClient, roomStore: RoomStore, roomStateStore: RoomStateStore, roomAccountDataStore: RoomAccountDataStore, roomTimelineStore: RoomTimelineStore, roomOutboxMessageStore: RoomOutboxMessageStore, roomEventEncryptionServices: List<RoomEventEncryptionService>, mediaService: MediaService, forgetRoomService: ForgetRoomService, userInfo: UserInfo, timelineEventHandler: TimelineEventHandler, clock: Clock, config: MatrixClientConfiguration, typingEventHandler: TypingEventHandler, currentSyncState: CurrentSyncState, scope: CoroutineScope) : RoomService
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface Timeline<T>

This is an abstraction for a timeline. Call init first!

Link copied to clipboard
abstract class TimelineBase<T>(val onStateChange: suspend (TimelineStateChange<T>) -> Unit, val transformer: suspend (Flow<TimelineEvent>) -> T) : Timeline<T>

An implementation for some restrictions required by Timeline.

Link copied to clipboard
sealed interface TimelineEventAggregation
Link copied to clipboard
Link copied to clipboard
open class TimelineImpl<T>(roomService: RoomService, onStateChange: suspend (TimelineStateChange<T>) -> Unit = {}, transformer: suspend (Flow<TimelineEvent>) -> T) : TimelineBase<T>
Link copied to clipboard
data class TimelineState<T>(val elements: List<T> = listOf(), val isInitialized: Boolean = false, val isLoadingBefore: Boolean = false, val isLoadingAfter: Boolean = false, val canLoadBefore: Boolean = false, val canLoadAfter: Boolean = false)
Link copied to clipboard
data class TimelineStateChange<T>(val elementsBeforeChange: List<T> = listOf(), val elementsAfterChange: List<T> = listOf(), val addedElements: List<T> = listOf(), val removedElements: List<T> = listOf())
Link copied to clipboard

Functions

Link copied to clipboard
fun createRoomModule(): Module
Link copied to clipboard

Decrypts given event. Returns null, when encryption algorithm is not supported by any RoomEventEncryptionService.

Link copied to clipboard

Decrypts given event. Returns null, when encryption algorithm is not supported by any RoomEventEncryptionService.

Link copied to clipboard
Link copied to clipboard
inline fun <C : RoomAccountDataEventContent> RoomService.getAccountData(roomId: RoomId, key: String = ""): Flow<C?>
Link copied to clipboard
Link copied to clipboard
inline fun <C : StateEventContent> RoomService.getState(roomId: RoomId, stateKey: String = ""): Flow<ClientEvent.StateBaseEvent<C>?>
Link copied to clipboard
fun RoomService.getTimeline(onStateChange: suspend (TimelineStateChange<Flow<TimelineEvent>>) -> Unit = {}): SimpleTimeline
Link copied to clipboard
suspend fun RoomService.getTimelineEventsAround(roomId: RoomId, startFrom: EventId, configStart: GetTimelineEventConfig.() -> Unit = {}, configBefore: GetTimelineEventsConfig.() -> Unit = {}, configAfter: GetTimelineEventsConfig.() -> Unit = {}): List<Flow<TimelineEvent>>

Returns all timeline events around a starting event.

fun RoomService.getTimelineEventsAround(roomId: RoomId, startFrom: EventId, maxSizeBefore: StateFlow<Int>, maxSizeAfter: StateFlow<Int>, configStart: GetTimelineEventConfig.() -> Unit = {}, configBefore: GetTimelineEventsConfig.() -> Unit = {}, configAfter: GetTimelineEventsConfig.() -> Unit = {}): Flow<List<Flow<TimelineEvent>>>

Returns all timeline events around a starting event sorted with higher indexes being more recent.

Link copied to clipboard
@JvmName(name = "toList")
fun Flow<Flow<TimelineEvent>>.toFlowList(maxSize: StateFlow<Int>, minSize: MutableStateFlow<Int> = MutableStateFlow(0)): Flow<List<Flow<TimelineEvent>>>

Converts a flow of timeline events into a flow of list of timeline events limited by maxSize.

@JvmName(name = "toListFromLatest")
fun Flow<Flow<Flow<TimelineEvent>>?>.toFlowList(maxSize: StateFlow<Int>, minSize: MutableStateFlow<Int> = MutableStateFlow(0)): Flow<List<Flow<TimelineEvent>>>

Converts a flow of flows of timeline event into a flow of list of timeline events limited by maxSize.