CommonMPBackupExporter

abstract class CommonMPBackupExporter(selfUserId: BackupQualifiedId, val logger: BackupLogger? = null)

Entity able to serialize BackupData entities, like BackupMessage, BackupConversation, BackupUser into a cross-platform BackupData format.

Inheritors

Constructors

Link copied to clipboard
constructor(selfUserId: BackupQualifiedId, logger: BackupLogger? = null)

Properties

Link copied to clipboard
internal val logger: BackupLogger? = null
Link copied to clipboard
internal abstract val storage: BackupPageStorage

Functions

Link copied to clipboard
fun add(conversation: BackupConversation)
fun add(message: BackupMessage)
fun add(user: BackupUser)
Link copied to clipboard
internal suspend fun finalize(password: String, output: <Error class: unknown class>): ExportResult

Finalize the export and write the data to the given output. This method should be called after all the data was added.

Link copied to clipboard

Validates the given BackupConversation and its content.

internal fun CommonMPBackupExporter.validate(message: BackupMessage): Boolean

Validates the given BackupMessage and its content.

Validates the given BackupUser and its content.

Link copied to clipboard
internal abstract fun zipEntries(data: List<BackupPage>): <Error class: unknown class><<Error class: unknown class>>