SessionAccountDataService

interface SessionAccountDataService

This service is attached globally to the session.

Functions

Link copied to clipboard
abstract suspend fun deleteUserAccountData(type: String)

Deletes user account data of the given type.

Link copied to clipboard
abstract fun getLiveRoomAccountDataEvents(types: Set<String>): LiveData<List<RoomAccountDataEvent>>

Observe the room account data with the provided types. If an empty set is provided, AccountData of every room are observed

Link copied to clipboard
abstract fun getLiveUserAccountDataEvent(type: String): LiveData<Optional<UserAccountDataEvent>>

Observe the account data with the provided type.

Link copied to clipboard
abstract fun getLiveUserAccountDataEvents(types: Set<String>): LiveData<List<UserAccountDataEvent>>

Observe the account data with the provided types. If an empty set is provided, all the AccountData are observed

Link copied to clipboard
abstract fun getRoomAccountDataEvents(types: Set<String>): List<RoomAccountDataEvent>

Retrieve the room account data with the provided types. The return list can have a different size that the size of the types set, because some AccountData may not exist. If an empty set is provided, all the room AccountData are retrieved

Link copied to clipboard
abstract fun getUserAccountDataEvent(type: String): UserAccountDataEvent?

Retrieve the account data with the provided type or null if not found.

Link copied to clipboard
abstract fun getUserAccountDataEvents(types: Set<String>): List<UserAccountDataEvent>

Retrieve the account data with the provided types. The return list can have a different size that the size of the types set, because some AccountData may not exist. If an empty set is provided, all the AccountData are retrieved

Link copied to clipboard
abstract fun getUserAccountDataEventsStartWith(type: String): List<UserAccountDataEvent>

Retrieve user account data list whose type starts with the given type.

Link copied to clipboard
abstract suspend fun updateUserAccountData(type: String, content: Content)

Update the account data with the provided type and the provided account data content.