@@ -48,7 +48,19 @@ import org.matrix.olm.OlmOutboundGroupSession
4848 */
4949internal interface IMXCryptoStore {
5050
51+ /* *
52+ * Notify the store that a sync response treatment is starting.
53+ * Impacted methods:
54+ * - [setShouldShareHistory]
55+ * - [setShouldEncryptForInvitedMembers]
56+ * @See [onSyncCompleted] to notify that the treatment is over.
57+ */
5158 fun onSyncWillProcess ()
59+
60+ /* *
61+ * Notify the store that the sync treatment response is finished.
62+ * The store will save all aggregated data.
63+ */
5264 fun onSyncCompleted ()
5365
5466 /* *
@@ -291,13 +303,17 @@ internal interface IMXCryptoStore {
291303
292304 fun shouldEncryptForInvitedMembers (roomId : String ): Boolean
293305
306+ /* *
307+ * The data is not stored immediately, this MUST be call during a sync response treatment.
308+ */
294309 fun setShouldEncryptForInvitedMembers (roomId : String , shouldEncryptForInvitedMembers : Boolean )
295310
296311 fun shouldShareHistory (roomId : String ): Boolean
297312
298313 /* *
299314 * Sets a boolean flag that will determine whether or not room history (existing inbound sessions)
300315 * will be shared to new user invites.
316+ * The data is not stored immediately, this MUST be call during a sync response treatment.
301317 *
302318 * @param roomId the room id
303319 * @param shouldShareHistory The boolean flag
@@ -582,5 +598,8 @@ internal interface IMXCryptoStore {
582598 fun tidyUpDataBase ()
583599 fun getOutgoingRoomKeyRequests (inStates : Set <OutgoingRoomKeyRequestState >): List <OutgoingKeyRequest >
584600
601+ /* *
602+ * Store a bunch of data related to the users. @See [UserDataToStore].
603+ */
585604 fun storeUserDataToStore (userDataToStore : UserDataToStore )
586605}
0 commit comments