diff options
author | saturneric <[email protected]> | 2023-12-30 11:55:20 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-30 11:55:20 +0000 |
commit | 9f7593eab9b2d6f6fa6d76a303975b355b6ab458 (patch) | |
tree | 551f1dde32177137962ef1fcfed9e09d188ab36c /src/core/function/ArchiveFileOperator.h | |
parent | feat: add simple archiving functions for encrypt and decrypt (diff) | |
download | GpgFrontend-9f7593eab9b2d6f6fa6d76a303975b355b6ab458.tar.gz GpgFrontend-9f7593eab9b2d6f6fa6d76a303975b355b6ab458.zip |
feat: do not load entire data to memory in libarchive operations
Diffstat (limited to 'src/core/function/ArchiveFileOperator.h')
-rw-r--r-- | src/core/function/ArchiveFileOperator.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/function/ArchiveFileOperator.h b/src/core/function/ArchiveFileOperator.h index 86a3070d..ce3022bd 100644 --- a/src/core/function/ArchiveFileOperator.h +++ b/src/core/function/ArchiveFileOperator.h @@ -29,6 +29,7 @@ #pragma once #include "core/GpgFrontendCore.h" +#include "core/model/GFDataExchanger.h" #include "core/typedef/CoreTypedef.h" #include "core/utils/IOUtils.h" @@ -51,8 +52,9 @@ class GPGFRONTEND_CORE_EXPORT ArchiveFileOperator { * @param compress * @param files */ - static void NewArchive2Fd(const std::filesystem::path &target_directory, - int fd, const OperationCallback &cb); + static void NewArchive2DataExchanger( + const std::filesystem::path &target_directory, + std::shared_ptr<GFDataExchanger>, const OperationCallback &cb); /** * @brief @@ -60,8 +62,8 @@ class GPGFRONTEND_CORE_EXPORT ArchiveFileOperator { * @param archive_path * @param base_path */ - static void ExtractArchiveFromFd(int fd, - const std::filesystem::path &target_path, - const OperationCallback &cb); + static void ExtractArchiveFromDataExchanger( + std::shared_ptr<GFDataExchanger> fd, + const std::filesystem::path &target_path, const OperationCallback &cb); }; } // namespace GpgFrontend |