mirror of
https://github.com/openharmony/developtools_global_resource_tool.git
synced 2026-07-18 09:14:48 -04:00
@@ -27,8 +27,9 @@ class BinaryFilePacker {
|
||||
public:
|
||||
explicit BinaryFilePacker(const PackageParser &packageParser, const std::string &moduleName);
|
||||
virtual ~BinaryFilePacker();
|
||||
std::future<uint32_t> CopyBinaryFileAsync(const std::vector<std::string> &inputs);
|
||||
void StopCopy();
|
||||
void CopyBinaryFileAsync(const std::vector<std::string> &inputs);
|
||||
void Terminate();
|
||||
uint32_t GetResult();
|
||||
|
||||
protected:
|
||||
virtual uint32_t CopyBinaryFile(const std::vector<std::string> &inputs);
|
||||
@@ -37,14 +38,16 @@ protected:
|
||||
virtual bool IsDuplicated(const std::unique_ptr<FileEntry> &entry, std::string subPath);
|
||||
PackageParser packageParser_;
|
||||
std::string moduleName_;
|
||||
std::vector<std::future<uint32_t>> copyResults_;
|
||||
std::atomic<bool> stopCopy_{false};
|
||||
std::mutex mutex_;
|
||||
|
||||
private:
|
||||
uint32_t CopyBinaryFile(const std::string &filePath, const std::string &fileType);
|
||||
uint32_t CopyBinaryFileImpl(const std::string &src, const std::string &dst);
|
||||
uint32_t CopySingleFile(const std::string &path, std::string &subPath);
|
||||
std::future<uint32_t> copyFuture_;
|
||||
std::vector<std::future<uint32_t>> copyResults_;
|
||||
std::atomic<bool> terminate_{false};
|
||||
uint32_t result_ = RESTOOL_SUCCESS;
|
||||
};
|
||||
} // namespace Restool
|
||||
} // namespace Global
|
||||
|
||||
Reference in New Issue
Block a user