IMXCommonCryptoStore

interface IMXCommonCryptoStore

As a temporary measure rust and kotlin flavor are still using realm to store some crypto related information. In the near future rust flavor will complitly stop using realm, as soon as the missing bits are store in rust side (like room encryption settings, ..) This interface defines what's now used by both flavors. The actual implementation are moved in each flavors

Functions

Link copied to clipboard
abstract fun blockUnverifiedDevicesInRoom(roomId: String, block: Boolean)

Define if encryption keys should be sent to unverified devices in this room.

Link copied to clipboard
abstract fun close()

Close the store.

Link copied to clipboard
abstract fun deviceWithIdentityKey(userId: String, identityKey: String): CryptoDeviceInfo?

Retrieve a device by its identity key.

Link copied to clipboard
abstract fun getBlockUnverifiedDevices(roomId: String): Boolean

Tell if unverified devices should be blacklisted when sending keys.

Link copied to clipboard
abstract fun getGlobalBlacklistUnverifiedDevices(): Boolean
Link copied to clipboard
abstract fun getInboundGroupSession(sessionId: String, senderKey: String): MXInboundMegolmSessionWrapper?

Retrieve an inbound group session. Used in rust for lazy migration

Link copied to clipboard
abstract fun getLiveBlockUnverifiedDevices(roomId: String): LiveData<Boolean>

A live status regarding sharing keys for unverified devices in this room.

Link copied to clipboard
abstract fun getLiveGlobalCryptoConfig(): LiveData<GlobalCryptoConfig>
Link copied to clipboard
abstract fun getLiveMyDevicesInfo(): LiveData<List<DeviceInfo>>
abstract fun getLiveMyDevicesInfo(deviceId: String): LiveData<Optional<DeviceInfo>>
Link copied to clipboard
abstract fun getMyDevicesInfo(): List<DeviceInfo>
Link copied to clipboard
abstract fun getRoomAlgorithm(roomId: String): String?

Provides the algorithm used in a dedicated room.

Link copied to clipboard
abstract fun getRoomCryptoInfo(roomId: String): CryptoRoomInfo?
Link copied to clipboard
abstract fun open()

open any existing crypto store.

Link copied to clipboard
abstract fun roomWasOnceEncrypted(roomId: String): Boolean
Link copied to clipboard
abstract fun saveMyDevicesInfo(info: List<DeviceInfo>)
Link copied to clipboard
abstract fun setAlgorithmInfo(roomId: String, encryption: EncryptionEventContent?)
Link copied to clipboard
abstract fun setGlobalBlacklistUnverifiedDevices(block: Boolean)

Set the global override for whether the client should ever send encrypted messages to unverified devices. If false, it can still be overridden per-room. If true, it overrides the per-room settings.

Link copied to clipboard
abstract fun setShouldEncryptForInvitedMembers(roomId: String, shouldEncryptForInvitedMembers: Boolean)

Sets a boolean flag that will determine whether or not this device should encrypt Events for invited members.

Link copied to clipboard
abstract fun setShouldShareHistory(roomId: String, shouldShareHistory: Boolean)

Sets a boolean flag that will determine whether or not room history (existing inbound sessions) will be shared to new user invites.

Link copied to clipboard
abstract fun shouldEncryptForInvitedMembers(roomId: String): Boolean
Link copied to clipboard
abstract fun storeData(cryptoStoreAggregator: CryptoStoreAggregator)
Link copied to clipboard
abstract fun tidyUpDataBase()