MPBackupExporter

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

actual class MPBackupExporter(selfUserId: <Error class: unknown class>)

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

Samples

samples.backup.BackupSamplesJs.exportBackup

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

Samples

samples.backup.BackupSamplesNonJS.exportBackup

Constructors

Link copied to clipboard
constructor(selfUserId: <Error class: unknown class>)
constructor(selfUserId: BackupQualifiedId, workDirectory: String, outputDirectory: String, fileZipper: FileZipper, fileSystem: <Error class: unknown class>, logger: BackupLogger? = null)
constructor(selfUserId: BackupQualifiedId, workDirectory: String, outputDirectory: String, fileZipper: FileZipper)

Properties

Link copied to clipboard
internal val logger: BackupLogger? = null
internal val logger: BackupLogger? = null
Link copied to clipboard
internal expect open override val storage: BackupPageStorage
actual open val storage: BackupPageStorage
internal actual open override val storage: BackupPageStorage

Functions

Link copied to clipboard
fun add(conversation: BackupConversation)
fun add(message: BackupMessage)
fun add(reaction: BackupReaction)
fun add(user: BackupUser)
fun add(conversation: BackupConversation)
fun add(message: BackupMessage)
fun add(reaction: BackupReaction)
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.

fun finalize(password: String): <Error class: unknown class><BackupExportResult>

Exports all the previously added data to a BackupExportResult. This method should be called after all the data was added.

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.

suspend fun finalize(password: String): BackupExportResult

Persists all the data into a single backup file, returning a BackupExportResult. This method should be called after all the data was added.

Link copied to clipboard
internal fun CommonMPBackupExporter.validate(conversation: BackupConversation): Boolean

Validates the given BackupConversation and its content.

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

Validates the given BackupMessage and its content.

internal fun CommonMPBackupExporter.validate(user: BackupUser): Boolean

Validates the given BackupUser and its content.

Link copied to clipboard
internal expect open override fun zipEntries(data: List<BackupPage>): <Error class: unknown class><<Error class: unknown class>>
actual open fun zipEntries(data: List<<Error class: unknown class>>): <Error class: unknown class><<Error class: unknown class>>
internal actual open override fun zipEntries(data: List<BackupPage>): <Error class: unknown class><<Error class: unknown class>>