mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-18 04:50:08 +03:00
Add some doc
This commit is contained in:
parent
06f3c11010
commit
437b93cc18
2 changed files with 25 additions and 0 deletions
|
@ -48,7 +48,19 @@ import org.matrix.olm.OlmOutboundGroupSession
|
||||||
*/
|
*/
|
||||||
internal interface IMXCryptoStore {
|
internal interface IMXCryptoStore {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notify the store that a sync response treatment is starting.
|
||||||
|
* Impacted methods:
|
||||||
|
* - [setShouldShareHistory]
|
||||||
|
* - [setShouldEncryptForInvitedMembers]
|
||||||
|
* @See [onSyncCompleted] to notify that the treatment is over.
|
||||||
|
*/
|
||||||
fun onSyncWillProcess()
|
fun onSyncWillProcess()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notify the store that the sync treatment response is finished.
|
||||||
|
* The store will save all aggregated data.
|
||||||
|
*/
|
||||||
fun onSyncCompleted()
|
fun onSyncCompleted()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -291,6 +303,9 @@ internal interface IMXCryptoStore {
|
||||||
|
|
||||||
fun shouldEncryptForInvitedMembers(roomId: String): Boolean
|
fun shouldEncryptForInvitedMembers(roomId: String): Boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The data is not stored immediately, this MUST be call during a sync response treatment.
|
||||||
|
*/
|
||||||
fun setShouldEncryptForInvitedMembers(roomId: String, shouldEncryptForInvitedMembers: Boolean)
|
fun setShouldEncryptForInvitedMembers(roomId: String, shouldEncryptForInvitedMembers: Boolean)
|
||||||
|
|
||||||
fun shouldShareHistory(roomId: String): Boolean
|
fun shouldShareHistory(roomId: String): Boolean
|
||||||
|
@ -298,6 +313,7 @@ internal interface IMXCryptoStore {
|
||||||
/**
|
/**
|
||||||
* Sets a boolean flag that will determine whether or not room history (existing inbound sessions)
|
* Sets a boolean flag that will determine whether or not room history (existing inbound sessions)
|
||||||
* will be shared to new user invites.
|
* will be shared to new user invites.
|
||||||
|
* The data is not stored immediately, this MUST be call during a sync response treatment.
|
||||||
*
|
*
|
||||||
* @param roomId the room id
|
* @param roomId the room id
|
||||||
* @param shouldShareHistory The boolean flag
|
* @param shouldShareHistory The boolean flag
|
||||||
|
@ -582,5 +598,8 @@ internal interface IMXCryptoStore {
|
||||||
fun tidyUpDataBase()
|
fun tidyUpDataBase()
|
||||||
fun getOutgoingRoomKeyRequests(inStates: Set<OutgoingRoomKeyRequestState>): List<OutgoingKeyRequest>
|
fun getOutgoingRoomKeyRequests(inStates: Set<OutgoingRoomKeyRequestState>): List<OutgoingKeyRequest>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a bunch of data related to the users. @See [UserDataToStore].
|
||||||
|
*/
|
||||||
fun storeUserDataToStore(userDataToStore: UserDataToStore)
|
fun storeUserDataToStore(userDataToStore: UserDataToStore)
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,12 @@ import org.matrix.android.sdk.api.session.crypto.crosssigning.CryptoCrossSigning
|
||||||
import org.matrix.android.sdk.api.session.crypto.model.CryptoDeviceInfo
|
import org.matrix.android.sdk.api.session.crypto.model.CryptoDeviceInfo
|
||||||
|
|
||||||
internal data class UserDataToStore(
|
internal data class UserDataToStore(
|
||||||
|
/**
|
||||||
|
* Map of userId -> (Map of deviceId -> [CryptoDeviceInfo]).
|
||||||
|
*/
|
||||||
val userDevices: MutableMap<String, Map<String, CryptoDeviceInfo>> = mutableMapOf(),
|
val userDevices: MutableMap<String, Map<String, CryptoDeviceInfo>> = mutableMapOf(),
|
||||||
|
/**
|
||||||
|
* Map of userId -> [CryptoCrossSigningKeys].
|
||||||
|
*/
|
||||||
val userCrossSigningKeys: MutableMap<String, CryptoCrossSigningKeys> = mutableMapOf(),
|
val userCrossSigningKeys: MutableMap<String, CryptoCrossSigningKeys> = mutableMapOf(),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue