summaryrefslogtreecommitdiffstats
path: root/package.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--package.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/package.h b/package.h
index 5eef9c965..cd44d10be 100644
--- a/package.h
+++ b/package.h
@@ -32,6 +32,13 @@
// interface for both packages loaded in memory and packages read from fd.
class Package : public VerifierInterface {
public:
+ static std::unique_ptr<Package> CreateMemoryPackage(
+ const std::string& path, const std::function<void(float)>& set_progress);
+ static std::unique_ptr<Package> CreateMemoryPackage(
+ std::vector<uint8_t> content, const std::function<void(float)>& set_progress);
+ static std::unique_ptr<Package> CreateFilePackage(const std::string& path,
+ const std::function<void(float)>& set_progress);
+
virtual ~Package() = default;
// Opens the package as a zip file and returns the ZipArchiveHandle.
@@ -40,12 +47,6 @@ class Package : public VerifierInterface {
// Updates the progress in fraction during package verification.
void SetProgress(float progress) override;
- static std::unique_ptr<Package> CreateMemoryPackage(
- const std::string& path, const std::function<void(float)>& set_progress);
-
- static std::unique_ptr<Package> CreateMemoryPackage(
- std::vector<uint8_t> content, const std::function<void(float)>& set_progress);
-
protected:
// An optional function to update the progress.
std::function<void(float)> set_progress_;