OlmCryptoStore

class OlmCryptoStore(olmAccountRepository: OlmAccountRepository, olmForgetFallbackKeyAfterRepository: OlmForgetFallbackKeyAfterRepository, olmSessionRepository: OlmSessionRepository, inboundMegolmSessionRepository: InboundMegolmSessionRepository, inboundMegolmMessageIndexRepository: InboundMegolmMessageIndexRepository, outboundMegolmSessionRepository: OutboundMegolmSessionRepository, tm: RepositoryTransactionManager, config: MatrixClientConfiguration, statisticCollector: ObservableCacheStatisticCollector, storeScope: CoroutineScope, clock: Clock) : Store

Constructors

Link copied to clipboard
constructor(olmAccountRepository: OlmAccountRepository, olmForgetFallbackKeyAfterRepository: OlmForgetFallbackKeyAfterRepository, olmSessionRepository: OlmSessionRepository, inboundMegolmSessionRepository: InboundMegolmSessionRepository, inboundMegolmMessageIndexRepository: InboundMegolmMessageIndexRepository, outboundMegolmSessionRepository: OutboundMegolmSessionRepository, tm: RepositoryTransactionManager, config: MatrixClientConfiguration, statisticCollector: ObservableCacheStatisticCollector, storeScope: CoroutineScope, clock: Clock)

Functions

Link copied to clipboard
open suspend override fun clearCache()

Only deletes everything, that can be fetched from server.

Link copied to clipboard
open suspend override fun deleteAll()

Deletes everything.

Link copied to clipboard
suspend fun getForgetFallbackKeyAfter(): Flow<Instant?>
Link copied to clipboard
Link copied to clipboard
suspend fun getOlmAccount(): String?
Link copied to clipboard
open suspend override fun init(coroutineScope: CoroutineScope)
Link copied to clipboard
suspend fun updateForgetFallbackKeyAfter(updater: suspend (Instant?) -> Instant?)
Link copied to clipboard
suspend fun updateInboundMegolmMessageIndex(sessionId: String, roomId: RoomId, messageIndex: Long, updater: suspend (oldMegolmSessionIndex: StoredInboundMegolmMessageIndex?) -> StoredInboundMegolmMessageIndex?)
Link copied to clipboard
suspend fun updateInboundMegolmSession(sessionId: String, roomId: RoomId, updater: suspend (oldInboundMegolmSession: StoredInboundMegolmSession?) -> StoredInboundMegolmSession?)
Link copied to clipboard
suspend fun updateOlmAccount(updater: suspend (String?) -> String)
Link copied to clipboard
suspend fun updateOlmSessions(senderKey: KeyValue.Curve25519KeyValue, updater: suspend (oldSessions: Set<StoredOlmSession>?) -> Set<StoredOlmSession>?)
Link copied to clipboard
suspend fun updateOutboundMegolmSession(roomId: RoomId, updater: suspend (oldOutboundMegolmSession: StoredOutboundMegolmSession?) -> StoredOutboundMegolmSession?)
Link copied to clipboard
suspend fun OlmCryptoStore.waitForInboundMegolmSession(roomId: RoomId, sessionId: String, firstKnownIndexLessThen: Long? = null, onNotExisting: suspend CoroutineScope.() -> Unit? = null)