From 490c7882e46b3342ac53abfabca3979e4f40a4c5 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 27 Jun 2024 17:19:12 -0300 Subject: [PATCH] Add missing docs for sendBackupData() --- .../seedvault/transport/backup/BackupCoordinator.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/com/stevesoltys/seedvault/transport/backup/BackupCoordinator.kt b/app/src/main/java/com/stevesoltys/seedvault/transport/backup/BackupCoordinator.kt index 4e3b53bb..510428d4 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/transport/backup/BackupCoordinator.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/transport/backup/BackupCoordinator.kt @@ -277,6 +277,16 @@ internal class BackupCoordinator( return full.performFullBackup(targetPackage, fileDescriptor, flags, token, salt) } + /** + * Tells the transport to read [numBytes] bytes of data from the socket file descriptor + * provided in the [performFullBackup] call, and deliver those bytes to the datastore. + * + * @param numBytes The number of bytes of tarball data available to be read from the socket. + * @return [TRANSPORT_OK] on successful processing of the data; [TRANSPORT_ERROR] to + * indicate a fatal error situation. If an error is returned, the system will + * call finishBackup() and stop attempting backups until after a backoff and retry + * interval. + */ suspend fun sendBackupData(numBytes: Int) = full.sendBackupData(numBytes) /**