summaryrefslogtreecommitdiffstats
path: root/install/include/install/package.h
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-06-14 06:20:07 +0200
committerandroid-build-merger <android-build-merger@google.com>2019-06-14 06:20:07 +0200
commit9a6e469e9897a2dd83491c46125b44609226451d (patch)
tree11aee4ac2143225519610b36b5b639c943de580d /install/include/install/package.h
parentMerge "Use the new ziparchive Next std::string_view overload." am: 053ea111a7 am: a3211f0ecb am: e242d87430 (diff)
parentMerge "InstallPackage now takes a package as parameter" am: 87e2275970 am: a927a16841 (diff)
downloadandroid_bootable_recovery-9a6e469e9897a2dd83491c46125b44609226451d.tar
android_bootable_recovery-9a6e469e9897a2dd83491c46125b44609226451d.tar.gz
android_bootable_recovery-9a6e469e9897a2dd83491c46125b44609226451d.tar.bz2
android_bootable_recovery-9a6e469e9897a2dd83491c46125b44609226451d.tar.lz
android_bootable_recovery-9a6e469e9897a2dd83491c46125b44609226451d.tar.xz
android_bootable_recovery-9a6e469e9897a2dd83491c46125b44609226451d.tar.zst
android_bootable_recovery-9a6e469e9897a2dd83491c46125b44609226451d.zip
Diffstat (limited to 'install/include/install/package.h')
-rw-r--r--install/include/install/package.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/install/include/install/package.h b/install/include/install/package.h
index cd44d10be..0b4233238 100644
--- a/install/include/install/package.h
+++ b/install/include/install/package.h
@@ -28,6 +28,11 @@
#include "verifier.h"
+enum class PackageType {
+ kMemory,
+ kFile,
+};
+
// This class serves as a wrapper for an OTA update package. It aims to provide the common
// interface for both packages loaded in memory and packages read from fd.
class Package : public VerifierInterface {
@@ -41,6 +46,10 @@ class Package : public VerifierInterface {
virtual ~Package() = default;
+ virtual PackageType GetType() const = 0;
+
+ virtual std::string GetPath() const = 0;
+
// Opens the package as a zip file and returns the ZipArchiveHandle.
virtual ZipArchiveHandle GetZipArchiveHandle() = 0;