From 5d9bc19e316b6ff46fbe792fb737e6c6cb3fb91f Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Wed, 23 Oct 2024 09:04:48 +0200 Subject: [PATCH] refactor: Update UploadManager kDocs --- .../managers/UploadManager.kt | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt b/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt index 54bfda2d..91424257 100644 --- a/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt +++ b/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt @@ -86,8 +86,6 @@ class UploadManager( /** * Creates a new upload session in the database. * - * This method inserts a new upload session into the database using the provided `newUploadSession` data. - * * @param newUploadSession The data for the new upload session. * @throws RealmException If an error occurs during database access. * @throws CancellationException If the operation is cancelled. @@ -98,12 +96,7 @@ class UploadManager( } /** - * Initializes an upload session. - * - * This method retrieves an upload session from the database using the provided `uuid`. - * If the session is found, it creates an `InitUploadBody` object with the session data and the `recaptcha` token. - * It then calls the `initUpload()` method of the `uploadRepository` to initiate the upload session on the server. - * Finally, it updates the upload session in the database with the response received from the server. + * Initializes an upload session and update it in database with the remote data. * * @param uuid The UUID of the upload session. * @param recaptcha The reCAPTCHA token or an empty string in any. @@ -140,10 +133,6 @@ class UploadManager( /** * Uploads a chunk of data for a file in an upload session. * - * This method retrieves an upload session from the database using the provided `uuid`. - * If the session is found and has a remote upload host and remote container, it calls the `uploadChunk()` method of the - * `uploadRepository` to send the chunk data to the server. - * * @param uuid The UUID of the upload session. * @param fileUUID The UUID of the file being uploaded. * @param chunkIndex The index of the chunk being uploaded. @@ -188,12 +177,6 @@ class UploadManager( /** * Finishes an upload session and add the transfer to the database . * - * This method retrieves an upload session from the database using the provided `uuid`. - * If the session is found and has a remote container UUID, it creates a `FinishUploadBody` object - * with the necessary data and calls the `finishUpload()` method of the `uploadRepository` to - * finalize the upload session on the server. - * Finally, it removes the upload session from the database. - * * @param uuid The UUID of the upload session. * @throws CancellationException If the operation is cancelled. * @throws ApiException If there is a general API error.