CommonMPBackupImporter

abstract class CommonMPBackupImporter(encryptedStream: EncryptedStream<XChaChaPoly1305AuthenticationData> = EncryptedStream.XChaCha20Poly1305, headerSerializer: BackupHeaderSerializer = BackupHeaderSerializer.Default)

Entity able to parse backed-up data and returns digestible data in BackupData format.

Inheritors

Constructors

Link copied to clipboard
internal constructor(encryptedStream: EncryptedStream<XChaChaPoly1305AuthenticationData> = EncryptedStream.XChaCha20Poly1305, headerSerializer: BackupHeaderSerializer = BackupHeaderSerializer.Default)

Functions

Link copied to clipboard
internal abstract fun getUnencryptedArchiveSink(): <Error class: unknown class>

Provides a sink to store the unencrypted data. Be the archive encrypted or not, the data will be moved to this sink until unzipAllEntries is used.

Link copied to clipboard
internal suspend fun importBackup(source: <Error class: unknown class>, passphrase: String?): BackupImportResult

Decrypt (if needed) and unzip the backup artifact. The resulting BackupImportResult.Success contains a BackupImportPager, that can be used to consume pages of backed up application data, like messages, users and conversations.

Link copied to clipboard
internal fun peekBackup(source: <Error class: unknown class>): BackupPeekResult

Peeks into a backup artifact, returning information about it.

Link copied to clipboard
internal abstract suspend fun unzipAllEntries(): BackupPageStorage

Unzips all entries in the zip archive stored in the sink returned by getUnencryptedArchiveSink.